denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Jackmidi Status?


From: Nils
Subject: Re: [Denemo-devel] Jackmidi Status?
Date: Sat, 19 Sep 2009 18:18:24 +0200

I wanted to hold this back (although I spoke with Richard about this plan) 
until there is less to do, but since Jeremiah asked I want to introduce my plan 
(again). I think it is safe for any user needs and great for cross-platform and 
working "Out of the box". It might sound rather complex at first, but I think 
its a clean solution and in the end we have less dependencies and a more 
flexible program.

The background is: 
There are users who just want (not-so-basic) direct playback with Denemo 
without changing lots of parameters, connecting in external apps or having a 
Library like JACK installed at all.

And there are users who want the most complex enviroments and need JACK Midi 
for this. Denemo already has most of the infrastructure build-in for this. 

But these users (including me) sometimes want to work on their complex Denemo 
projects without loading all external programs without fearing that Denemo 
looses their connection data. Or they want to send the .denemo file to someone 
who does not have the same software samplers and soundfonts. 

Or, in Jeremiahs example, he wants fast, zero-configure, playback for Games.

For this a dual mode is needed. Its already described on my wiki page 
http://www.denemo.org/index.php/User:Nils

Denemo comes with a small, internal sampler, which can be used as 
standard-sampler or as fallback. This enables Denemo to work "out of the box" 
and is particully useful for beginners or for a quick session. Its useful for 
Microsoft Windows, too, which does not have the Linux-Audio Infrastructure and 
where it's common for software to be monolithic.

    * Build-in Fluidsynth and a license-compatible General Midi Soundfont 
(.sf2) which is not too big in size.
    * If no other connections via jackmidi are made all staffs route to the 
internal sampler.
    * Fluidsynth connects to the standard-audio-input automatically because it 
can do audio-out on its own for most audio-drivers. Of course other avaible 
outputs this can be turned on/off.
    * Even if the piece has connections to external applications in 
JACK-midi-mode there is a Fallback switch to override all connection and route 
them to Denemos internal sampler. This is non-destructive and does not touch 
the original connections. Its particully useful if you don't want to load big 
external samplers for a quick review or if you share your piece with other 
poeple.
    * So every staff has two set of options - (chanel, banks, program and their 
changes). For the internal sampler and for jack-out. 

Additionally it would be a good thing to let Configure handle the Jack 
installation.
 Configure checks for JACK and simply does not activate it, if its not there. 
Else it provides JACK functionality, which is disabled in Denemos preferences 
as default. 

Nils

On Sat, 19 Sep 2009 06:36:46 -0500
Jeremiah Benham <address@hidden> wrote:

> 
> >From the info that you have given below do you think it would actually
> be better to create ear training based games based on midi file
> playback? Is this the only thing that works reliably cross platform? The
> reason why I ask is that most of my students have windows computers. I
> want the ear training games to be cross platform. I just came up with
> this idea:
> 
> Create a function to change the color of the notes in denemo. Ear
> training apps could then put the notes on the staff in white. The user
> would not see it. Midi file playback would still work even though the
> user does not see the notes. When the user answers the correct answer
> the or have answered incorrectly several times the note color status
> changes to black or any other color. 
> 
> Does this sound like a good idea? Should ear training apps use immediate
> playback or file playback? 
> 
> Even though I ask this question I have already almost finished my first
> ear training game using immediate playback. This is what made me wonder
> if my Windows using students will be able to use it. 
> 
> Jeremiah 
> 
> 
> 
> 
> On Fri, 2009-08-28 at 11:37 +0100, Richard Shann wrote:
> > On Thu, 2009-08-27 at 16:52 -0500, Jeremiah Benham wrote:
> > > What is the status of jackmidi? What needs done? I have not kept up with 
> > > this. Richard didn't you say you had real time output working.
> > hmm, IIRC what I did was to create the smf structures with links from
> > each DenemoObject to the smf event(s) it gives rise to (in fact, did I
> > create a list of smf events in each DenemoObject? I think I would have,
> > only that would make sense).
> > 
> > 
> > AFAIK there are currently several ways noises can come out of Denemo:
> > 
> > Sounds made when a note is entered
> >       * if the open of /dev/sequencer has succeeded a midi message is
> >         generated by some hard-wired code and sent to that device
> >         [exportmidi.c]
> >       * otherwise a tone is generated from evaluating sin() function and
> >         via to portaudio routines [audiocapture.c]
> > 
> > Sounds made by hitting Play
> >       * if built with JACK midi data is generated for the whole (?)
> >         movement (cached) as smf_tracks/smf_events and then the
> >         smf_events are sent to the jack ports, starting with the one
> >         attached to the current DenemoObject [exportmidi.c, jackmidi.c]
> >       * if not built with JACK the smf midi data is generated for the
> >         selection and written to disk as a MIDI file. Then an external
> >         MIDI player is spawned with the filename [exportmidi.c,
> >         playback.c]
> > 
> > Sounds made by entering a duration (audible feedback checked)
> >       * tone generated from evaluating sin() function and via to
> >         portaudio routines [audiocapture.c]
> >       * no other code is currently wired to this, I suspect.
> > 
> > Misc.
> >       * There is an option under the Playback menu called CSound
> >         playback. I have never tried it.
> >       * The gdk_beep() function is called (e.g. on measure change with
> >         audible feedback checked), this operates a built-in speaker
> >         usually (O/S dependent action).
> > 
> > I have just pasted the above onto the denemo.org website as it occurs to
> > me that we could start collecting together our understanding of how
> > Denemo is working.
> > 
> > So, I think it is a trivial step to do functions that
> >       * creation of the MIDI data (the smf_events attached to objects)
> >         without going on to playback (ie just a cut down version of the
> >         current playback function)
> >       * outputting the MIDI data of the DenemoObject at the cursor
> > 
> > The last one may not be quite trivial, e.g. for cases such as tied notes
> > - you might just get the noteon without the noteoff. And then there
> > would be "play everything that starts at the time the current object
> > starts" command, which again might be quite trivial.
> > I am fairly sure I haven't done these. However, the other day I had a
> > few moments to spare and thought I would finish off the lyrics, actually
> > printing multiple verses in LilyPond, so I opened up exportlilypond.c
> > and found the code already there. I suppose it was me wot did it.
> > 
> > What I think you may remember me writing was that I had got real time
> > input working. I.E. The response of the MIDI via direct reading
> > of /dev/midi1 up to the standard of the input via JACK, just by tweaking
> > the rate of checking for new data. The upshot is that for my purposes I
> > can just startup denemo without jack and transcribe a piece of music
> > using the pc-keyboard for entering rhythms the MIDI keyboard for
> > entering pitches and listening to the result by spawning timidity.
> > Before, the MIDI-in would miss notes if I played in too fast. But if it
> > was something else, dig out the email and remind me!
> > 
> > But this is not to say that I don't have any interest in the jack
> > possibilities - this idea that you can add information to a score to
> > produce an output that has actual musical merit - could be used for a
> > film score etc - is intriguing.
> > 
> > Richard
> > 
> > 
> > 
> > > Where is this code. I looked at jackmidi.c and it did not pop out to me. 
> > > 
> > > The reason I ask was becuase I was going to work on some ear training 
> > > exercises 
> > 
> > > and thought the current portaudio output does not really sound very good 
> > > for doing ear training. 
> > 
> > Yes, I agree, sine waves are not entirely relevant to the question of
> > listening to, and judging, the pitch of real instruments. Especially
> > judging the intervals in chords. And it would be so easy to do much
> > better. I think it is just a matter of #if JACK send
> > currentobject->smf_event to jack midi port. #endif
> > 
> > Richard
> > 
> > 
> > 
> > > 
> > > Jeremiah
> > > 
> > > 
> > > _______________________________________________
> > > Denemo-devel mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> > 
> > 
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/denemo-devel
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel
> 


-- 
Nils <address@hidden>




reply via email to

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