-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a tab from scratch #1
Comments
Hello. Yes, I admit, creating a blank tab is not as easy as it should be. I've made some changes in the develop branch to make better default values. So, pull the latest changes from develop and try this code to make a tab with one track and one blank measure: import guitarpro
song = guitarpro.base.Song()
track = guitarpro.base.Track(name='Track 1')
track.strings = [guitarpro.base.GuitarString(n, v)
for n, v in enumerate([64, 59, 55, 50, 45, 40], start=1)]
measure = guitarpro.base.Measure()
measure.voices = [guitarpro.base.Voice(), guitarpro.base.Voice()]
for voice in measure.voices:
voice.addBeat(guitarpro.base.Beat())
track.addMeasure(measure)
song.addTrack(track)
guitarpro.write(song, 'blank.gp5') |
Thanks! |
Hi! |
@matejkocevar wrote:
The text was updated successfully, but these errors were encountered: