Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
basicsynth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jean-Marie FAVREAU
basicsynth
Commits
0724aa3a
Commit
0724aa3a
authored
6 years ago
by
Jean-Marie FAVREAU
Browse files
Options
Downloads
Patches
Plain Diff
Amélioration, rendu sur plusieurs lignes de la partition
parent
df68e7e5
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
brahms.py
+1
-0
1 addition, 0 deletions
brahms.py
joie.py
+1
-0
1 addition, 0 deletions
joie.py
musique/exercice.py
+19
-1
19 additions, 1 deletion
musique/exercice.py
tabac2.py
+1
-0
1 addition, 0 deletions
tabac2.py
with
22 additions
and
1 deletion
brahms.py
+
1
−
0
View file @
0724aa3a
...
@@ -60,6 +60,7 @@ if args.exerciceSpectrogramme or args.transparent:
...
@@ -60,6 +60,7 @@ if args.exerciceSpectrogramme or args.transparent:
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setLongueurPartitionColoree
(
6
)
g
.
setLongueurPartitionColoree
(
6
)
g
.
setLongueurPartitionMusicale
(
12
)
if
args
.
exerciceSpectrogramme
:
if
args
.
exerciceSpectrogramme
:
g
.
genererExerciceSpectrogramme
(
brahms
,
"
exercices/ex-spec-brahms.tex
"
,
"
thème 4
"
,
"
Lullaby, berceuse de Brahms
"
)
g
.
genererExerciceSpectrogramme
(
brahms
,
"
exercices/ex-spec-brahms.tex
"
,
"
thème 4
"
,
"
Lullaby, berceuse de Brahms
"
)
if
args
.
transparent
:
if
args
.
transparent
:
...
...
This diff is collapsed.
Click to expand it.
joie.py
+
1
−
0
View file @
0724aa3a
...
@@ -72,6 +72,7 @@ if args.exerciceSpectrogramme or args.transparent:
...
@@ -72,6 +72,7 @@ if args.exerciceSpectrogramme or args.transparent:
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setLongueurPartitionColoree
(
8
)
g
.
setLongueurPartitionColoree
(
8
)
g
.
setLongueurPartitionMusicale
(
16
)
if
args
.
exerciceSpectrogramme
:
if
args
.
exerciceSpectrogramme
:
g
.
genererExerciceSpectrogramme
(
joie
,
"
exercices/ex-spec-joie.tex
"
,
"
thème 1
"
,
"
Hymne à la joie
"
)
g
.
genererExerciceSpectrogramme
(
joie
,
"
exercices/ex-spec-joie.tex
"
,
"
thème 1
"
,
"
Hymne à la joie
"
)
if
args
.
transparent
:
if
args
.
transparent
:
...
...
This diff is collapsed.
Click to expand it.
musique/exercice.py
+
19
−
1
View file @
0724aa3a
...
@@ -24,12 +24,17 @@ class GenerateurExercice(GammeTemperee):
...
@@ -24,12 +24,17 @@ class GenerateurExercice(GammeTemperee):
self
.
margeLegende
=
2.0
self
.
margeLegende
=
2.0
self
.
boomwhackers
=
[]
self
.
boomwhackers
=
[]
self
.
longueurPartitionColoree
=
4
self
.
longueurPartitionColoree
=
4
self
.
longueurPartitionMusicale
=
16
# donne la largeur d'une ligne de partition colorée, exprimée
# donne la largeur d'une ligne de partition colorée, exprimée
# en nombre de noires
# en nombre de noires
def
setLongueurPartitionColoree
(
self
,
longueur
):
def
setLongueurPartitionColoree
(
self
,
longueur
):
self
.
longueurPartitionColoree
=
longueur
self
.
longueurPartitionColoree
=
longueur
# donne la largeur d'une ligne de partition musicale, exprimée
# en nombre de noires
def
setLongueurPartitionMusicale
(
self
,
longueur
):
self
.
longueurPartitionMusicale
=
longueur
def
setBoomwhackers
(
self
,
mw
):
def
setBoomwhackers
(
self
,
mw
):
import
json
import
json
...
@@ -467,6 +472,10 @@ class GenerateurExercice(GammeTemperee):
...
@@ -467,6 +472,10 @@ class GenerateurExercice(GammeTemperee):
maxNote
=
max
([
n
for
n
in
notes
if
n
[
1
]
>
0
])
maxNote
=
max
([
n
for
n
in
notes
if
n
[
1
]
>
0
])
(
maxoctave
,
maxidnote
)
=
maxNote
(
maxoctave
,
maxidnote
)
=
maxNote
midOctave
=
int
((
maxoctave
+
minoctave
)
/
2
)
midOctave
=
int
((
maxoctave
+
minoctave
)
/
2
)
dureePartition
=
self
.
longueurPartitionMusicale
*
self
.
noire
longueurCourante
=
0
if
beamer
:
if
beamer
:
result
+=
"
\\
normalmusicsize
"
result
+=
"
\\
normalmusicsize
"
else
:
else
:
...
@@ -482,10 +491,19 @@ class GenerateurExercice(GammeTemperee):
...
@@ -482,10 +491,19 @@ class GenerateurExercice(GammeTemperee):
result
+=
self
.
dureeToMusicTex
(
note
[
1
])
+
"
{
"
result
+=
self
.
dureeToMusicTex
(
note
[
1
])
+
"
{
"
result
+=
self
.
frequenceToMusicTeX
(
note
[
0
],
midOctave
)
result
+=
self
.
frequenceToMusicTeX
(
note
[
0
],
midOctave
)
result
+=
"
}
"
result
+=
"
}
"
longueurCourante
+=
note
[
1
]
else
:
else
:
# TODO
# TODO
pass
pass
result
+=
"
\enotes
"
if
longueurCourante
>=
dureePartition
and
i
<
len
(
partition
)
-
1
:
longueurCourante
=
0
result
+=
"
\\
enotes
"
result
+=
"
\\
zendextract
"
result
+=
"
\\
end{music}
"
result
+=
"
\\
begin{music}
"
result
+=
"
\\
startextract
"
result
+=
"
\\
notes
"
result
+=
"
\\
enotes
"
result
+=
"
\\
zendextract
"
result
+=
"
\\
zendextract
"
result
+=
"
\\
end{music}
"
result
+=
"
\\
end{music}
"
result
+=
"
\\
caption{Partition simplifiée}
"
result
+=
"
\\
caption{Partition simplifiée}
"
...
...
This diff is collapsed.
Click to expand it.
tabac2.py
+
1
−
0
View file @
0724aa3a
...
@@ -57,6 +57,7 @@ if args.exerciceSpectrogramme or args.transparent:
...
@@ -57,6 +57,7 @@ if args.exerciceSpectrogramme or args.transparent:
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
=
GenerateurExercice
(
gamme
.
bpm
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setBoomwhackers
(
boomwhackers
)
g
.
setLongueurPartitionColoree
(
6
)
g
.
setLongueurPartitionColoree
(
6
)
g
.
setLongueurPartitionMusicale
(
8
)
if
args
.
exerciceSpectrogramme
:
if
args
.
exerciceSpectrogramme
:
g
.
genererExerciceSpectrogramme
(
tabac
,
"
exercices/ex-spec-tabac2.tex
"
,
"
thème 3
"
,
"
j
'
ai du bon tabac
"
)
g
.
genererExerciceSpectrogramme
(
tabac
,
"
exercices/ex-spec-tabac2.tex
"
,
"
thème 3
"
,
"
j
'
ai du bon tabac
"
)
if
args
.
transparent
:
if
args
.
transparent
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment