bugDenemo - Bugs: bug #44820, MIDI output is very basic

 
 

bug #44820: MIDI output is very basic

Submitter:  Richard Shann <rshann>
Submitted:  Sun 12 Apr 2015 06:47:39 PM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 11 Jan 2016 05:27:01 PM UTC, comment #6: 

The Playback View in 2.0.1 gives LilyPond's MIDI output.

Richard Shann <rshann>
Group administrator
Mon 13 Apr 2015 08:45:15 PM UTC, comment #5: 

An enhanced version of a Scheme script handling MIDI in from a master keyboard is:

;;; Master keyboard filter
(let ((midi "")
      (command 0)
      (channel 0)
      (note 0)
      (velocity 0)
      (midivalue 0)
      (keyboardactive 1)
      (isstop 0)
      (loop 0))
     (d-InputFilterNames (_ "Master Keyboard MIDI Filter"))
     (d-SetMidiCapture #t)
     (set! loop  (lambda ()
(begin
(set! midi (d-GetMidi #f))
(set! command (bit-extract (list-ref midi 0) 4 8))
(set! channel (bit-extract(list-ref midi 0)  0 4))
(set! note (list-ref midi 1))
(set! velocity (list-ref midi 2))
(disp "command " command ", channel " channel ", note " note ", velocity " velocity)
(set! midivalue (+ (ash velocity 16) (ash note 8) (ash command 4)))
(disp "midi value " midivalue)
(if (and (= command #x9)(= channel 0)) ; NoteOn message on channel 0
(begin
(if keyboardactive (d-PutMidi midi) (d-OutputMidi midivalue))
))
(if (and (= command #x9)(= channel 1)) ; NoteOn message on channel 1 -> trigger pads
(begin
(disp "trigger pad " note)
(if keyboardactive
(case note
((36)(d-Set0))
((37)(d-Set1))
((38)(d-Set2))
((39)(d-Set3))
((40)(d-SetBreve))
((41)(d-AddDot))
((42)(d-Set5))
((43)(d-Set4))
((44)(d-AddDot))
((45)(d-RemoveDot))
((46)(d-Diminish))
((47)(d-Augment))
((48)(d-ToggleBeginSlur))
((49)(d-ToggleEndSlur))
((50)(d-StartBeam))
((51)(d-EndBeam))
)
)
))
(if (= command #x0B) ; ControlChange message
(begin
(case note
((119)(begin
  (set! keyboardactive (not keyboardactive)) ; set variable
  (if keyboardactive (d-InputFilterNames ( "Master Keyboard MIDI Filter")) (d-InputFilterNames ( "Master Keyboard MIDI Filter (offline)"))) ; update status bar
)) ; record button
((118)(d-DenemoPlayCursorToEnd)) ; play button
((117)(d-Stop)) ; stop button
((115)(d-MoveToMeasureLeft)) ; rewind button
((116)(d-MoveToMeasureRight)) ; forward button
((114)(set! isstop 1)) ; loop button
(else (if keyboardactive (d-PutMidi midi))) ; other control change message
)
))
(if (or (= command 0) (= isstop 1))
(begin
(display "Filter stopping")
(d-InputFilterNames (_ "No MIDI filter active")) ; update status bar (code from MidiFilterOff)
)
(loop)))))
     (loop))
(d-SetMidiCapture #f)

Anonymous
Mon 13 Apr 2015 07:54:32 AM UTC, comment #4: 

The bug tracker is used to track feature requests - under severity you can see that I have set this to "Wish".
Concerning MIDI messages, it is possible to add MIDI messages into a Denemo score. There is an example which you can load via
File->Open->Open Example and then choose
Temperament Shifting Playback.denemo
This has MIDI control messages inserted to change the temperament ("tuning") at the change of key in measure 54.
I notice that the Directives->Markings->Dynamics script also controls the MIDI output to change the velocity, a lot more could be done to improve Denemo's MIDI output by adding MIDI output to the scripts generating the various musical symbols. So this feature request is a request for someone to do this.
Handling MIDI-in is also something that can be scripted -
http://lists.gnu.org/archive/html/denemo-devel/2014-10/msg00106.html
is part of thread giving details of that.
As an example:
the volume when playing the MIDI keyboard is exploited in the command Input->MIDI->Angry Delete
which replaces the previous note if a note is played with extra volume (as when correcting a mistaken note entry).


Richard Shann <rshann>
Group administrator
Sun 12 Apr 2015 11:45:51 PM UTC, comment #3: 

Also it's necessary to implement recodring midi notes into two tracks simultaneously. Some keyboards allow to set split notes for right and left hand and then they send out right hand on ch 1 and left on ch 2. I can record hands to different channels using 'arecordmidi -s' command. But i would like to do it with denemo. Maybe we can give that command from denemo and import recorded midi file into denemo.

Anonymous
Sun 12 Apr 2015 11:38:24 PM UTC, comment #2: 

Also it would be good to implement recording not just notes but also their volumes when playing the midi keyboard. Also some keyboards provide Send Pressure, Send Aftertouch, and other Sends i don't remember. You can see their list in specs or in last version of Carla. If you add a plugin to to plugin properties and you will see all those 6 Sends including Send Map program changes... etc

Anonymous
Sun 12 Apr 2015 11:28:35 PM UTC, comment #1: 

bug can be not a bug but not implemented feature. i added systain marks into the score but when i play back the score, sustain is not heard from the sampler. it means that denemo sends out only Notes messages but niether sustain nor other control midi messages. please make denemo send out all midi messages

Anonymous
Sun 12 Apr 2015 06:47:39 PM UTC, original submission:  

The workaround is to use LilyPonds MIDI generation capabilities.

Richard Shann <rshann>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rshann (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-11 rshann StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code