Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: Larpon/pyClickTrack
base: 2abaa0cecd
...
head fork: Larpon/pyClickTrack
compare: 07285a2579
  • 5 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
View
16 README.md
@@ -10,11 +10,17 @@ Quick start
See if stuff works:
-### Linux
-$ ``python pyClickTrack ./Test.ct``
-
-### Windows (if python is in path):
-C:\> ``python pyClickTrack Test.ct``
+### Linux (bash-like)
+``
+cd <path/to/pyClickTrack>
+python ./pyClickTrack.py Test.ct
+``
+
+### Windows (cmd)
+``
+cd <path/to/pyClickTrack>
+python ./pyClickTrack.py Test.ct
+``
The above should create a file named *Test.wav* in the current directory.
View
49 Test.ct
@@ -1,49 +0,0 @@
----
-#
-# YAML config file format
-# http://yaml.org
-# See examples at http://yaml-online-parser.appspot.com
-#
-
-track:
- silence: 0 # 1000
- parts:
- - part: 'intro'
- bpm: 120
- bars: 4
- bar: '+---'
-
- - part: 'a1'
- bpm: 140
- bars: 4
- bar: '+-+-'
-
- - part: 'b1'
- bpm: 160
- bars: 4
- bar: '+---'
-
- - part: 'a2'
- bpm: 140
- bars: 3
- bar: '+-+-'
-
- - part: 'b2'
- bpm: 160
- bars: 4
- bar: '+---'
-
- - part: 'c'
- bpm: 200
- bars: 8
- bar: '++++'
-
- - part: 'd'
- bpm: 200
- bars: 2
- bar: '+-++'
-
- - part: 'outro'
- bpm: 100
- bars: 4
- bar: '+-----'
View
60 Test_1.ct
@@ -0,0 +1,60 @@
+#
+# YAML config file format
+# http://yaml.org
+# See examples at http://yaml-online-parser.appspot.com
+#
+
+track:
+ silence: 1000 # Start the track with 1 second (1000 milliseconds) of silence.
+
+ parts:
+ - part: 'Intro (Classic start!)'
+ bpm: 120
+ bars: 4
+ bar: '+---'
+
+ - part: 'Verse 1'
+ bpm: 140
+ bars: 4
+ bar: '+---'
+
+ - part: 'Chorus 1'
+ bpm: 160
+ bars: 4
+ bar: '+---'
+
+ # Add extra hi click on every second hit in this verse (the '+-+-')
+ - part: 'Verse 2'
+ bpm: 140
+ bars: 4
+ bar: '+-+-'
+
+ - part: 'Chorus 2'
+ bpm: 160
+ bars: 4
+ bar: '+---'
+
+ # Epic solo speed bridge with hi clicks all the way (just to piss the drummer off!)
+ - part: 'Bridge'
+ bpm: 200
+ bars: 8
+ bar: '++++'
+
+ # Return to verse and chorus 1 - but with custom loaded clicks.
+ - part: 'Verse 1'
+ bpm: 140
+ bars: 4
+ bar: '@==='
+
+ - part: 'Chorus 1'
+ bpm: 160
+ bars: 4
+ bar: '@==='
+
+ # Slow outro
+ - part: 'Outro'
+ bpm: 100
+ bars: 4
+ bar: '+-----'
+
+# Add as many - part: entries as you like in each file - just remember that YAML is indentation based!
View
64 Test_2.ct
@@ -0,0 +1,64 @@
+#
+# YAML config file format
+# http://yaml.org
+# See examples at http://yaml-online-parser.appspot.com
+#
+
+track:
+ silence: 1000 # Start the track with 1 second (1000 milliseconds) of silence.
+ sounds:
+ #'<char>': 'path/to/wave/file.wav' # Custom sounds can be loaded from everywhere - both from root or relative to pyClickTrack directory
+ #'+': 'path/to/wave/file.wav' # This overrides the default click sound on '+' hits
+ '@': 'data/custom_example_hi.wav'
+ '=': ['data/custom_example_lo.wav',44]
+ parts:
+ - part: 'Intro (Classic start!)'
+ bpm: 120
+ bars: 4
+ bar: '+---'
+
+ - part: 'Verse 1'
+ bpm: 140
+ bars: 4
+ bar: '+---'
+
+ - part: 'Chorus 1'
+ bpm: 160
+ bars: 4
+ bar: '+---'
+
+ # Add extra hi click on every second hit in this verse (the '+-+-')
+ - part: 'Verse 2'
+ bpm: 140
+ bars: 4
+ bar: '+-+-'
+
+ - part: 'Chorus 2'
+ bpm: 160
+ bars: 4
+ bar: '+---'
+
+ # Epic solo speed bridge with hi clicks all the way (just to piss the drummer off!)
+ - part: 'Bridge'
+ bpm: 200
+ bars: 8
+ bar: '++++'
+
+ # Return to verse and chorus 1 - but with custom loaded clicks.
+ - part: 'Verse 1'
+ bpm: 140
+ bars: 4
+ bar: '@==='
+
+ - part: 'Chorus 1'
+ bpm: 160
+ bars: 4
+ bar: '@==='
+
+ # Slow outro
+ - part: 'Outro'
+ bpm: 100
+ bars: 4
+ bar: '+-----'
+
+# Add as many - part: entries as you like in each file - just remember that YAML is indentation based!
View
4 config.py
@@ -41,6 +41,10 @@ def get(path):
keys = path.split('.')
keys.reverse()
return _r_get(configs,keys)
+
+def has(path):
+ return get(path) is not None
+
def _r_get(segment,keys):
try:
View
0  data/ping_hi.wav → data/click_hi.wav
File renamed without changes
View
0  data/ping_lo.wav → data/click_lo.wav
File renamed without changes
View
BIN  data/custom_example_hi.wav
Binary file not shown
View
BIN  data/custom_example_lo.wav
Binary file not shown

No commit comments for this range

Something went wrong with that request. Please try again.