denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] jack midi input


From: Richard Shann
Subject: Re: [Denemo-devel] jack midi input
Date: Sat, 01 Nov 2008 18:46:47 +0000

On Sat, 2008-11-01 at 09:51 -0500, Jeremiah Benham wrote:
> On Sat, 2008-11-01 at 09:36 +0000, Richard Shann wrote:
> > On Fri, 2008-10-31 at 23:43 -0500, Jeremiah Benham wrote:
> > > On Fri, 2008-10-31 at 16:50 +0000, Richard Shann wrote:
> > > > On Fri, 2008-10-31 at 09:33 -0500, Jeremiah Benham wrote:
> > > > > ok. I first I want to thank Nils for suggesting I look at jack
> > > midi
> > > > > input. After looking at a few examples I quickly had denemo
> > > accepting
> > > > > midi input via jack. 
> > > > Great! Did you already manage to wire this in to the function
> > > > pitchentry() in the file pitchentry.c? One of the things this will
> > > get
> > > > you is the enharmonic control (whether Eb or D# is meant when the
> > > midi
> > > > pitch comes in).
> > > 
> > > No, I have held off on that. When I wrote something similar to this in
> > > the past I did it in a very low level way. This is not the approach I
> > > want and was unsure of what functions I should be using. At the moment
> > > it just prints the int midi note number(60 = mid c, 61 = c#/Db, 62 = e
> > > etc...) to the terminal. pitchentry()? are you sure. I read through
> > > that
> > > function and was wondering if that is really what you mean. I am not
> > > sure how to interface it with this function.
> > What you will need is to put
> > 
> > if(jack)
> >     get_midi_note();
> > else
> >     get_note();
> > 
> > in place of the get_note(), which is getting a note from audio. It
> > returns the note as a double Hz value.
> 
> I may be still confused. I am not even sure how to communicate how I am
> confused. Would I have the function call pitchentry every time a midi
> note on is received? I am not sure how it would go the other way around.
> 
> > The boolean jack could be passed in. Looking at this code, I see it
> > needs re-writing since we have moved to Denemo.gui as global rather than
> > allowing separate top level windows with their own menus & callbacks.
> > Ideally we will factorize this code starting from
> > start_pitch_recognition() which starts up a timer to collect pitches. If
> > you would like, you could check in (d-JackMidi) and I can modify
> > pitchentry.c to call it & put in the menu item to start it up. 
> 
> I checked in the code. I believe you will have to run ./generate_source
> again though. I see that it creates a (d-JackMidi) in scheme. 
> 
> 
> > >  I can convert the midi note
> > > numbers to hz. 
> > so this would be get_midi_note() as above
> > > Could I just use enter_note_in_score?  
> > You could, but would then miss things that are common to midi entry and
> > audio entry. There are things in audio entry that are irrelevant to midi
> > entry, but that is what factorization is all about.
> 
> I pushed my code changes. It is actually very small and very simple.
> Read through it. It may be easier for you to wire it into pitchentry
> than to get me up to speed. I don't know. 
I'm looking at it now.
Richard






reply via email to

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