denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Removing instrument tuner


From: Richard Shann
Subject: Re: [Denemo-devel] Removing instrument tuner
Date: Sat, 16 Jan 2010 10:04:55 +0000

 
> 
> What do you recommend I focus on at this moment. At put this on the  
> back burner if you need help with something.
> 
> Jeremiah

Well, here are some suggestions in order of size

JACK Midi input: at the moment init_jack is called twice, the second
time (prompted by selecting MIDI input) it starts the input. Just an
accident of history. It should be called once and do everything then.
(I had a go at this, but it didn't work straight away, and I don't have
much idea about the connections etc).

Tidying up the device manager: there are a bunch of globals in the file
that shouldn't be there. The GtkIters especially look suspicious, that
sort of thing shouldn't be passed in such an opaque fashion. Anything
that should be accessed by more than one file (e.g. staff props.c
accessing the xxx from device_manager.c should get it from a field in
the one global Denemo structure, i.e. Denemo.xxx).

The JACK input is plugged in to the audio input code, so the key number
is turned into a frequency and then "recognized" and turned back into a
note. This was just the fastest hack to wire it in. The important thing
that is going on is decoupling the input of the MIDI note from the
output of that note into the score. There is a timer running that picks
up any note that has arrived and puts it into the score. This has to be
this way because in general the input is asynchronous (possibly via an
interrupt) so all that happens on arrival of the input note is that it
is put in a buffer. The gtk timer is running to pick up anything in the
buffer and put it out. All that is fine, but sharing this mechanism with
the audio input has meant that MIDI input is getting translated into Hz
then back into a denemo note, using floating point arithmetic,
logarithms, you name it. It is amazing that it works quickly enough, but
there is no need, it really should be tidied up.

The playback control: this is sketched out on denemo.org under the todo
list.
BTW denemo.org seems to be down...
Richard






reply via email to

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