denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI (was Re: [Denemo-devel] Anacrusis script needed)


From: Richard Shann
Subject: Re: MIDI (was Re: [Denemo-devel] Anacrusis script needed)
Date: Thu, 10 Sep 2009 21:00:40 +0100

On Thu, 2009-09-10 at 14:06 -0500, Jeremiah Benham wrote:
> On Thu, 2009-09-10 at 17:15 +0100, Richard Shann wrote:
> > On Thu, 2009-09-10 at 08:08 -0500, Jeremiah Benham wrote:
> > > On Wed, 2009-09-09 at 22:09 +0100, Richard Shann wrote:
> > > 
> > > > I don't have any understanding of this stuff at the moment, so I
> > > can't
> > > > help without reading up on it. Usually there is an example that
> > > comes
> > > > with these libraries that you can modify and integrate - is that
> > > where
> > > > you started? Or did you work from the docs? 
> > > 
> > > I started with the docs and then went to the manual. After studying a
> > > few examples I feel like I am getting to grips with it. I just pushed
> > > some code to git that emulates a "monosynth" (a synth incapable of
> > > polyphony). It is not a synth though because it just writes midi data
> > > to
> > > the jack port. It sends an all note off
> > Is sending all note off just something to workaround some bug? You would
> > presumably just want to send a noteon and then a noteoff after the right
> > amount of time?
> > What happens when you try to do this?
> 
> If I do just noteon then noteoff a user would to hit "c" then "d" they
> would hear c and d at the same time until there corresponding noteoffs
> were reached. I did not want that.
I can imagine two sorts of audio feedback people might want when
entering notes at the keyboard
     1. a short pitch is emitted corresponding to the note at the cursor
        when the keystroke has been acted on. So c followed by sharp
        would result in two short notes. If the player put in notes
        quickly enough they might overlap a bit.
     2. a pitch sounded for the prevailing duration, but this would only
        really be useful when inputting folk type melodies not involving
        adding an accidental. (Otherwise two notes would sound, and the
        merit of the system - being able to play music in in time -
        would be lost).

However if the user were to define commands that combined inserting a
note with adding an accidental, this might change:
        c  -> the note c
        Shift-c  -> the note c-sharp
        Alt-c -> the note c-flat
If someone were to define such an entry method, they would include their
desired audio output in the script for each command, I guess.

There is a built-in "playback notes entered immediately code"; this code
I think should just result in short notes as in (1) above as this would
generally be the most useful thing.

>  Currently if not compiled with jack
> and the user enters a note via script like this:
> 
> (d-C)
> (d-Sharpen)
> 
> They do not here "c" and "cis" at the same time. The only here "cis".

I can confirm that this happens. I can't imagine why! Very strange. Even
if you do d-RefreshDisplay you only get the one note. And

(d-C)
(d-RefreshDisplay)
 (d-Sharpen)
 (d-CursorUp)
 (d-AddNoteToChord)
issues only one note.

This is all accidental. I think scripts should take control of the audio
output if they want it. (Not sure how you would stop the effect we are
seeing - perhaps it is only one note per script?)

> This is the behavior I am trying to emulate with this particular jack
> callback function. Do you have another recommendation? 
"jack callback function"?
Not too clear what you meant: is it clear that I think that all you need
to do is wire in a short note output at the same time and in the same
way as the current output via portaudio?
So entering a triad you would hear the notes as you typed them in/added
them to the chord.

Richard


> One drawback to
> this is that if user enters a triad only the lowest note is heard. I was
> trying to recreate consistency amongst the types of midi/audio out. I
> can modify this function to check if more than one note exists do all
> note off followed by a triad of noteons then a triad of noteoffs. I say
> triad but it can be any arbitrary number of notes. 
> 
> Jeremiah
> 
> > Richard
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/denemo-devel
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]