Skip to content
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

Note lengths vs BPM #3

Closed
whaleygeek opened this issue Sep 8, 2013 · 2 comments
Closed

Note lengths vs BPM #3

whaleygeek opened this issue Sep 8, 2013 · 2 comments

Comments

@whaleygeek
Copy link

Hi, been doing some work with CA. I was trying to code up something a bit more "melodic" or "harmonic" as opposed to something rhythmic like a drum beat or random sequence. I couldn't find any obvious way of setting note lengths, so for example a melodic pattern that consists of a number of quarter-notes followed by a half-note at the end, actually gets played as the last note as a quarter note with a quarter note rest.

This is not as noticeable with the pretty_bell as it has short sustain, but if one was to try a piano (is there a synth name for a piano, would like to use one please!), to get something melodic that is musically accurate, you'd need to be able to have some control over note lengths (or in MIDI terms, set the note-on and note-off time independently somehow).

@rbnpi
Copy link
Contributor

rbnpi commented Oct 7, 2013

You can do this using the play_pattern_timed command with the attack parameter set to the same value as the note duration. eg play_pattern_timed [60,64,67,72],[0.25],"attack",0.25
If you want staccato try play_pattern_timed [60,64,67,72],[0.25],"attack",0.01

@samaaron
Copy link
Collaborator

You can specify the duration of the pretty_bell on its own by passing the "release" argument to the note function:

note 60, "release", 1

This will ensure the note takes 1 second to fully decay.

This was referenced Sep 25, 2015
hzulla added a commit to hzulla/sonic-pi that referenced this issue May 2, 2016
samaaron added a commit that referenced this issue May 24, 2016
Moving towards weblate #3: Tutorial transition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants