Kara-Moon Forum
April 28, 2024, 10:54:02 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Can't suppress default Voice for Melody (neophyte question)  (Read 733 times)
smrz
Newbie
*
Posts: 2


« on: December 31, 2023, 07:12:07 AM »

I'm having a problem changing the Voice of a Melody.  I'm probably making a trivial mistake but I can't figure it out.

I've defined a Melody

Quote
Melody Define M0 \
    4 c- 80; \
    4 d- 80; \
    4 e- 80; \
    4 f- 80;

If I play it with the notes
Quote
1   C
2   C
3   C
4      C

it plays with a default voice.  I tried changing the voice using

Quote
Begin Melody
   Sequence M0
   Voice Cello
End

(entered before the notes).

However, when I run this, I get the notes played with a cello and with the default voice. I can't figure out how to suppress the default voice.

Any advice would be appreciated.

Thanks

PS The full mma file is

Quote
SetMIDIPlayer fluidsynth -a alsa -m alsa_seq -i /usr/share/sounds/sf2/FluidR3_GM.sf2

Tempo 60

Melody Define M0 \
    4 c- 80; \
    4 d- 80; \
    4 e- 80; \
    4 f- 80;

Begin Melody
   Sequence M0
   Voice Cello
End

1   C
2   C
3   C
4      C

Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: December 31, 2023, 05:29:43 PM »

Not sure exactly what you are trying to do here (other than confuse me on the last day of '23 ... which you succeeded at!), but the mistake is in how you have defined the Melody strings. The syntax for the notes in a  Solo or Melody  are NOT the same as that for a "regular" sequence  Evil

So, in your definition of MO

Code:
Melody Define M0 \
    4 c- 80; \
    4 d- 80; \
    4 e- 80; \
    4 f- 80;

you have actually created the notes C- and G# (note 80). So, you are getting some very interesting harmonies Smiley If you want to micromanage note volumes (actually they are velocities, but that is a different discussion) you have to do it like this:

Code:
Melody Define M0 \
    4 c-/80; \
    4 d-/80; \
    4 e-/80; \
    4 f-/80;

BTW, I think the notation above is slightly deceiving since it implies a 4 bar sequence. Better would be:


Code:
Melody Define M0  4 c-/80; 4 d-/80;  4 e-/80;   4 f-/80; 

And, since the duration is being repeated:


Code:
Melody Define M0  4 c-/80;  d-/80;  e-/80;    f-/80; 

Since you are dropping all the notes by a single octave, try using the OCTAVE option when you create the melody (Octave 3 or Octave 4) leave out the "-"s.

And, finally, since the velocity is just using the default:


Code:
Melody Define M0  4 c;  d;  e;   f; 

Hope this helps.


Logged

My online life: http://www.mellowood.ca
smrz
Newbie
*
Posts: 2


« Reply #2 on: December 31, 2023, 07:24:59 PM »

Thanks! The problem was my misunderstanding of the syntax for Melody.  With the correct syntax, my problem is solved. (FYI all I'm doing is trying to learn how to use Melody).  I promise no more questions until (at least) 2024.

Have a good new years and thanks again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.045 seconds with 19 queries.