Discussion:
[Audacity-devel] MIDI playback open thread
Paul Licameli
2017-06-06 14:35:28 UTC
Permalink
I'm starting an open thread here for discussing outstanding obstacles to
the MIDI playback project.

I am not the expert in the topic and I hope to draw on others' knowledge.

Some things I am aware of:


1. I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
2. Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
1. If MIDI playback does interact with these things, should it change
pitch, not just tempo?
3. EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think
the makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but
I think it should not be difficult. It just needs to do something
analogous with what we do for other lib-src.
4. I have had no success making installations of MIDI drivers on macOs.
We will likely need some FAQ or manual page explaining how to do this.

Feel free to add.

PRL
Peter Sampson
2017-06-06 14:39:45 UTC
Permalink
And as Steve has pointed out elsewhere

5) Scrubbing doesn't really make sense for MIDI. For example, "note off"
message is meaningless unless it comes after a "note on" message, and
a patch change message will do completely the wrong thing if played in
reverse.

Playing MIDI in reverse would need to be done intelligently, analyzing
the MIDI data first so that MIDI events could be reorganized into a
sensible order.

Peter.
Post by Paul Licameli
I'm starting an open thread here for discussing outstanding obstacles to
the MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
1. I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
2. Making it interact well with play-at-speed and with scrubbing may
be difficult, but may be dispensible for a first release of the feature.
1. If MIDI playback does interact with these things, should it
change pitch, not just tempo?
3. EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I
think the makefiles simply never instruct the Linux build to compile the
portmidi library. I am not adept enough with Linux building to figure that
out but I think it should not be difficult. It just needs to do something
analogous with what we do for other lib-src.
4. I have had no success making installations of MIDI drivers on
macOs. We will likely need some FAQ or manual page explaining how to do
this.
Feel free to add.
PRL
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2017-06-06 16:01:14 UTC
Permalink
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.

I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs. We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.

Exactly where do I enable MIDI OUT for Audacity on Mac?


Gale
Steve the Fiddle
2017-06-06 17:00:45 UTC
Permalink
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.

When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.

Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.

To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.

Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs. We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2017-06-06 18:12:52 UTC
Permalink
So, the simplest option, although audio Play-at-Speed without
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".



Gale
Post by Steve the Fiddle
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs. We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Paul Licameli
2017-06-06 18:35:37 UTC
Permalink
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us
first to render MIDI for ourselves. There was mention of doing that
perhaps with some third party library. However I count that beyond 2.2.0
scope unless someone surprises me.

Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?

Or would the ideal be to give the choice among these two behaviors to the
user?

The best simple answer to these questions in 2.2.0 is simply to evade
them. Just disallow MIDI playback in such cases. Should that pop up a
warning or just silently exclude the MIDI tracks from the playback?

PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
I'm starting an open thread here for discussing outstanding obstacles
to the
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
MIDI playback project.
I am not the expert in the topic and I hope to draw on others'
knowledge.
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does
not
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change
pitch,
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
Post by Paul Licameli
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think
the
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out
but I
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
think it should not be difficult. It just needs to do something
analogous
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------
------------------
Post by Steve the Fiddle
Post by Gale Andrews
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Post by Steve the Fiddle
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
James Crook
2017-06-06 19:04:18 UTC
Permalink
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us
first to render MIDI for ourselves. There was mention of doing that
perhaps with some third party library. However I count that beyond 2.2.0
scope unless someone surprises me.
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
The best simple answer to these questions in 2.2.0 is simply to evade
them.
+1
Post by Paul Licameli
Just disallow MIDI playback in such cases. Should that pop up a
warning or just silently exclude the MIDI tracks from the playback?
PRL
Ultimately it is RMs decision as to how feature-complete a feature needs
to be to release it.

--James.
Steve the Fiddle
2017-06-06 21:04:50 UTC
Permalink
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves.
Conversely they may expect the Note track to behave like MIDI, and,
for example, they may want to change the speed so as to tune an audio
track to concert pitch when the Note track is already in concert
pitch.
Post by Paul Licameli
There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
I agree that eventually we should be able to render Note tracks as
audio, but that should be something the user chooses to do (or not do)
rather than something that is done automatically. As soon as a note
track is rendered to audio it loses most of the advantages of MIDI.

There are many things that MIDI can do that are impossible or very
difficult with audio, including arpeggiation effects, rhythm
quantizing, instrumental part extraction / rearranging / playing with
different instruments, automatic harmonization, changing the musical
key (including major to minor), and much more.
Post by Paul Licameli
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
If / when we can render Note tracks to audio, the choice to convert to
audio should lie with users.

We don't know what MIDI devices people will be using. MIDI playback
shouldn't be limited to the OS's default synth.
If they are using an external MIDI sound module or MIDI keyboard, then
they will probably have the ability to transpose and tune via their
hardware.
Post by Paul Licameli
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning or
just silently exclude the MIDI tracks from the playback?
Excluding Note tracks from scrubbing seems sensible for now. Scrubbing
MIDI is not impossible, but it's tricky.

I don't see why not have "Play at Speed" for Note tracks. I presume
that Note tracks have mute and solo buttons?

Steve
Post by Paul Licameli
PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Paul Licameli
2017-06-06 22:02:59 UTC
Permalink
Post by Paul Licameli
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time
track,
Post by Paul Licameli
simply to apply to the as-rendered sound. To do that would require us
first
Post by Paul Licameli
to render MIDI for ourselves.
Conversely they may expect the Note track to behave like MIDI, and,
for example, they may want to change the speed so as to tune an audio
track to concert pitch when the Note track is already in concert
pitch.
Post by Paul Licameli
There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
I agree that eventually we should be able to render Note tracks as
audio, but that should be something the user chooses to do (or not do)
rather than something that is done automatically. As soon as a note
track is rendered to audio it loses most of the advantages of MIDI.
There are many things that MIDI can do that are impossible or very
difficult with audio, including arpeggiation effects, rhythm
quantizing, instrumental part extraction / rearranging / playing with
different instruments, automatic harmonization, changing the musical
key (including major to minor), and much more.
Post by Paul Licameli
Or a user might reasonably expect as Steve says that these timeline
changes
Post by Paul Licameli
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
If / when we can render Note tracks to audio, the choice to convert to
audio should lie with users.
We don't know what MIDI devices people will be using. MIDI playback
shouldn't be limited to the OS's default synth.
If they are using an external MIDI sound module or MIDI keyboard, then
they will probably have the ability to transpose and tune via their
hardware.
Post by Paul Licameli
The best simple answer to these questions in 2.2.0 is simply to evade
them.
Post by Paul Licameli
Just disallow MIDI playback in such cases. Should that pop up a warning
or
Post by Paul Licameli
just silently exclude the MIDI tracks from the playback?
Excluding Note tracks from scrubbing seems sensible for now. Scrubbing
MIDI is not impossible, but it's tricky.
I don't see why not have "Play at Speed" for Note tracks. I presume
that Note tracks have mute and solo buttons?
Steve
I don't say we should not allow Play At Speed for a NoteTrack alone. To
clarify, I ask what playback of Wave and MIDI tracks together should mean,
when playing at-speed or when there is a time track. The WaveTrack would
change pitch and tempo, but the MIDI track, only tempo. The mix would be
weird. Should that case just be disallowed?

PRL
Post by Paul Licameli
Post by Paul Licameli
PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
I'm starting an open thread here for discussing outstanding
obstacles
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor
does
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the
feature.
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
Post by Paul Licameli
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I
think
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that
out
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in
Audacity.
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------
------------------
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Post by Paul Licameli
Post by Gale Andrews
Post by Steve the Fiddle
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Post by Paul Licameli
Post by Gale Andrews
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Post by Paul Licameli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Steve the Fiddle
2017-06-06 22:49:41 UTC
Permalink
I think we should just allow it to be weird. People sometimes like weird things

Steve
Post by Paul Licameli
Post by Steve the Fiddle
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves.
Conversely they may expect the Note track to behave like MIDI, and,
for example, they may want to change the speed so as to tune an audio
track to concert pitch when the Note track is already in concert
pitch.
Post by Paul Licameli
There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
I agree that eventually we should be able to render Note tracks as
audio, but that should be something the user chooses to do (or not do)
rather than something that is done automatically. As soon as a note
track is rendered to audio it loses most of the advantages of MIDI.
There are many things that MIDI can do that are impossible or very
difficult with audio, including arpeggiation effects, rhythm
quantizing, instrumental part extraction / rearranging / playing with
different instruments, automatic harmonization, changing the musical
key (including major to minor), and much more.
Post by Paul Licameli
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
If / when we can render Note tracks to audio, the choice to convert to
audio should lie with users.
We don't know what MIDI devices people will be using. MIDI playback
shouldn't be limited to the OS's default synth.
If they are using an external MIDI sound module or MIDI keyboard, then
they will probably have the ability to transpose and tune via their
hardware.
Post by Paul Licameli
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning or
just silently exclude the MIDI tracks from the playback?
Excluding Note tracks from scrubbing seems sensible for now. Scrubbing
MIDI is not impossible, but it's tricky.
I don't see why not have "Play at Speed" for Note tracks. I presume
that Note tracks have mute and solo buttons?
Steve
I don't say we should not allow Play At Speed for a NoteTrack alone. To
clarify, I ask what playback of Wave and MIDI tracks together should mean,
when playing at-speed or when there is a time track. The WaveTrack would
change pitch and tempo, but the MIDI track, only tempo. The mix would be
weird. Should that case just be disallowed?
PRL
Post by Steve the Fiddle
Post by Paul Licameli
PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
I'm starting an open thread here for discussing outstanding obstacles
to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does
not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
Post by Paul Licameli
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think
the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out
but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Robert Hänggi
2017-06-07 00:27:23 UTC
Permalink
Post by Steve the Fiddle
I think we should just allow it to be weird. People sometimes like weird things
+1
It is certainly not weird with a drum track.
It is stranger when a hihat suddenly becomes a tom...
Robert
Post by Steve the Fiddle
Steve
On Tue, Jun 6, 2017 at 5:04 PM, Steve the Fiddle
Post by Steve the Fiddle
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves.
Conversely they may expect the Note track to behave like MIDI, and,
for example, they may want to change the speed so as to tune an audio
track to concert pitch when the Note track is already in concert
pitch.
Post by Paul Licameli
There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
I agree that eventually we should be able to render Note tracks as
audio, but that should be something the user chooses to do (or not do)
rather than something that is done automatically. As soon as a note
track is rendered to audio it loses most of the advantages of MIDI.
There are many things that MIDI can do that are impossible or very
difficult with audio, including arpeggiation effects, rhythm
quantizing, instrumental part extraction / rearranging / playing with
different instruments, automatic harmonization, changing the musical
key (including major to minor), and much more.
Post by Paul Licameli
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
If / when we can render Note tracks to audio, the choice to convert to
audio should lie with users.
We don't know what MIDI devices people will be using. MIDI playback
shouldn't be limited to the OS's default synth.
If they are using an external MIDI sound module or MIDI keyboard, then
they will probably have the ability to transpose and tune via their
hardware.
Post by Paul Licameli
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning
or
just silently exclude the MIDI tracks from the playback?
Excluding Note tracks from scrubbing seems sensible for now. Scrubbing
MIDI is not impossible, but it's tricky.
I don't see why not have "Play at Speed" for Note tracks. I presume
that Note tracks have mute and solo buttons?
Steve
I don't say we should not allow Play At Speed for a NoteTrack alone. To
clarify, I ask what playback of Wave and MIDI tracks together should mean,
when playing at-speed or when there is a time track. The WaveTrack would
change pitch and tempo, but the MIDI track, only tempo. The mix would be
weird. Should that case just be disallowed?
PRL
Post by Steve the Fiddle
Post by Paul Licameli
PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
Post by Paul Licameli
I'm starting an open thread here for discussing outstanding obstacles
to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does
not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change
pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
Post by Paul Licameli
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think
the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that
out
but I
think it should not be difficult. It just needs to do something
analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Federico Miyara
2017-06-07 00:52:10 UTC
Permalink
Post by Paul Licameli
I don't say we should not allow Play At Speed for a NoteTrack alone.
To clarify, I ask what playback of Wave and MIDI tracks together
should mean, when playing at-speed or when there is a time track. The
WaveTrack would change pitch and tempo, but the MIDI track, only
tempo. The mix would be weird. Should that case just be disallowed?
You have a good point here!

Change pitch isn't impossible, it would require to change the rate at
which samples are played back. In order to do so without messing with
sampler code, pitch change events should be sent, as commented by Steve

Federico
Federico Miyara
2017-06-07 00:40:08 UTC
Permalink
One possibility is to send an automatic note-off for any time-reversal
situation for all notes that are currently being played, and from then
on to interpret note-ons as note-offs and viceversa. It would allow to
test a retrogradation of a melody in real time without the (in general
undesirable) artifact of envelope reversing.

Federico
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time
track, simply to apply to the as-rendered sound. To do that would
require us first to render MIDI for ourselves. There was mention of
doing that perhaps with some third party library. However I count
that beyond 2.2.0 scope unless someone surprises me.
Or a user might reasonably expect as Steve says that these timeline
changes apply to MIDI events, thus changing tempo only. But what then
should it mean when the selection to play includes a combination of
Wave and MIDI tracks?
Or would the ideal be to give the choice among these two behaviors to
the user?
The best simple answer to these questions in 2.2.0 is simply to evade
them. Just disallow MIDI playback in such cases. Should that pop up
a warning or just silently exclude the MIDI tracks from the playback?
PRL
Steve the Fiddle
2017-06-07 07:48:11 UTC
Permalink
Post by Federico Miyara
One possibility is to send an automatic note-off for any time-reversal
situation for all notes that are currently being played, and from then on to
interpret note-ons as note-offs and viceversa. It would allow to test a
retrogradation of a melody in real time without the (in general undesirable)
artifact of envelope reversing.
That's a clever idea Federico, but in practice there is no guarantee
that the note off velocity will be meaningful rather than padding. For
the purpose of scrubbing, we could ignore (filter out) some data, such
as velocity, patch change, after touch, control change - perhaps
everything except note on and note off. It does need to be carefully
though through.

Even forward play requires some consideration of note on / note off.
For example, on stop, do we send an "all notes off" message (we
probably should). On resuming from Pause, do we resend note on
messages for notes that have not reached their note off message? (not
essential, but probably a good idea).

Steve
Post by Federico Miyara
Federico
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves. There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning or
just silently exclude the MIDI tracks from the playback?
PRL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Steve the Fiddle
2017-06-08 09:15:28 UTC
Permalink
MUCH more important than MIDI scrub or MIDI reverse play, is basic
MIDI play on Mac and Linux. In my opinion it would be totally wrong
for Audacity to release a major new feature on one platform only. I
don't think it's a problem if there are minor feature differences, but
MIDI playback is a major step, and really does need work on all
platforms.

Steve

On 8 June 2017 at 02:48, Pokechu22
On Wed, Jun 7, 2017 at 5:47 PM, Pokechu22
Interpreting note-ons as note-offs should be fairly easy, since (at least
as far as I can tell) the same event instance is used in both cases, with
mNextIsNoteOn being used to detect whether a note-on or a note-off should be
emitted. Simply xoring that with whether playback is reversed should work.
That wouldn't (as Steve hinted to) work for the other events, though, as
pitch change and similar would apply to everything behind it instead of
ahead of it. Ignoring those during reverse playback could work, but ideally
we'd need to find the place where it changes and work backwards (I can't
think of a practical way of doing that).
It turns out that...
I found a neat thing with portmidi: it supports passing a custom time
method (see PmTimeProcPtr). I don't know entirely how well it'd work, but
it may simplify some things if we could just pass the audio time to that.
If it supports negative time flow (which I doubt, but it might) then that'd
solve all problems for us, even.
is already being done (that's what MidiTime is for; I didn't see it because
it's a separate version of MidiTime that takes an argument that's passed to
Portmidi). And, it turns out that things don't work too well if it isn't an
actual millisecond timer (Portmidi seems to ignore it if it goes to fast,
and cause a lot of lag if it's set too slow). So this probably isn't a
valid approach.
Do not expect PortMidi to sort data according to timestamps -- messages
should be sent in the correct order, and timestamps MUST be non-decreasing.
See also "Example" for Pm_OpenOutput() above.
So, just giving it backwards timestamps wouldn't work either.
Forward scrubbing probably shouldn't be that hard, as it only needs
adjusting the rate of time. Backwards scrubbing will be more complicated,
but for basic notes it should be manageable. Seeking, though, suddenly
seems fairly difficult, since the skips could skip over note-ons, or worse,
note-offs. I'm not sure how best to implement that.
For example, on stop, do we send an "all notes off" message (we probably
should). On resuming from Pause, do we resend note on messages for notes
that have not reached their note off message? (not essential, but probably a
good idea).
Yes, all notes off is set on pausing and stopping. However, resuming
doesn't currently resent messages for notes that haven't finished yet. I'm
not sure if that would work well - consider a piano; when it's first pressed
it makes the main noise. If it were paused and unpausing the middle, you'd
only want the sustained portion, not the first part. Resending paused notes
would make it seem like they started over again, not that they were paused
and unpaused - I don't think it's possible to achieve that effect in midi.
--Poke
On Wed, Jun 7, 2017 at 12:48 AM, Steve the Fiddle
Post by Federico Miyara
One possibility is to send an automatic note-off for any time-reversal
situation for all notes that are currently being played, and from then on to
interpret note-ons as note-offs and viceversa. It would allow to test a
retrogradation of a melody in real time without the (in general undesirable)
artifact of envelope reversing.
That's a clever idea Federico, but in practice there is no guarantee
that the note off velocity will be meaningful rather than padding. For
the purpose of scrubbing, we could ignore (filter out) some data, such
as velocity, patch change, after touch, control change - perhaps
everything except note on and note off. It does need to be carefully
though through.
Even forward play requires some consideration of note on / note off.
For example, on stop, do we send an "all notes off" message (we
probably should). On resuming from Pause, do we resend note on
messages for notes that have not reached their note off message? (not
essential, but probably a good idea).
Steve
Post by Federico Miyara
Federico
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves. There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning or
just silently exclude the MIDI tracks from the playback?
PRL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Roger Dannenberg
2017-06-08 16:28:26 UTC
Permalink
Interpreting note-ons as note-offs should be fairly easy, since (at
least as far as I can tell) the same event instance is used in both
cases, with mNextIsNoteOn being used to detect whether a note-on or a
note-off should be emitted. Simply xoring that with whether playback
is reversed should work.
That will not work. There's no provision to "read" midi sequence
structures in reverse, nor would you want to. Going backwards in MIDI is
a real problem because MIDI messages are effectively state changes. If
the MIDI message is "change control 10 to value 50", how do you play
that backwards?
That wouldn't (as Steve hinted to) work for the other events, though,
as pitch change and similar would apply to everything behind it
instead of ahead of it. Ignoring those during reverse playback could
work, but ideally we'd need to find the place where it changes and
work backwards (I can't think of a practical way of doing that).
The "standard" way sequencers deal with this is to replay state changes
like pitch bend from the beginning up to the place you want to start
when you want to move to an earlier time point in a sequence. This is
pretty awkward for trying to play something in reverse. I think I would
be inclined to "bite the bullet" and do it right: produce a new sequence
that plays in reverse and use it to go backward.
I found a neat thing with portmidi: it supports passing a custom time
method (see PmTimeProcPtr). I don't know entirely how well it'd work,
but it may simplify some things if we could just pass the audio time
to that. If it supports negative time flow (which I doubt, but it
might) then that'd solve all problems for us, even.
No, as someone else said, time has to increase monotonically.
Forward scrubbing probably shouldn't be that hard, as it only needs
adjusting the rate of time. Backwards scrubbing will be more
complicated, but for basic notes it should be manageable. Seeking,
though, suddenly seems fairly difficult, since the skips could skip
over note-ons, or worse, note-offs. I'm not sure how best to
implement that.
Of course, Audacity already allows you to move to any time location and
start playing. This is/was implemented by playing back MIDI state
changes, suppressing note-ons, until you get to the desired time point.
You might think that when you press "play", you want to send note-ons
for all notes that should already be playing at the starting time, but I
think the implementation I did ignored notes that started before the
start time. Note-offs would be sent for these according to the sequence,
but they should be harmless.
For example, on stop, do we send an "all notes off" message
(we probably should). On resuming from Pause, do we resend note on
messages for notes that have not reached their note off message?
(not essential, but probably a good idea).
Yes, all notes off is set on pausing and stopping. However, resuming
doesn't currently resent messages for notes that haven't finished
yet. I'm not sure if that would work well - consider a piano; when
it's first pressed it makes the main noise. If it were paused and
unpausing the middle, you'd only want the sustained portion, not the
first part. Resending paused notes would make it seem like they
started over again, not that they were paused and unpaused - I don't
/think/ it's possible to achieve that effect in midi.
That was my conclusion as well. Of course if you had an organ pedal tone
that lasted for 1 minute, then pausing/continuing in the middle would
kill the pedal tone, which would be musically wrong, but at least it
would not be too surprising or unexpected that we only turn notes on
when we see note-on messages.
--Poke
On Wed, Jun 7, 2017 at 12:48 AM, Steve the Fiddle
Post by Federico Miyara
One possibility is to send an automatic note-off for any
time-reversal
Post by Federico Miyara
situation for all notes that are currently being played, and
from then on to
Post by Federico Miyara
interpret note-ons as note-offs and viceversa. It would allow to
test a
Post by Federico Miyara
retrogradation of a melody in real time without the (in general
undesirable)
Post by Federico Miyara
artifact of envelope reversing.
That's a clever idea Federico, but in practice there is no guarantee
that the note off velocity will be meaningful rather than padding. For
the purpose of scrubbing, we could ignore (filter out) some data, such
as velocity, patch change, after touch, control change - perhaps
everything except note on and note off. It does need to be carefully
though through.
Even forward play requires some consideration of note on / note off.
For example, on stop, do we send an "all notes off" message (we
probably should). On resuming from Pause, do we resend note on
messages for notes that have not reached their note off message? (not
essential, but probably a good idea).
Steve
Post by Federico Miyara
Federico
On Tue, Jun 6, 2017 at 2:12 PM, Gale Andrews
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial
time track,
Post by Federico Miyara
simply to apply to the as-rendered sound. To do that would
require us first
Post by Federico Miyara
to render MIDI for ourselves. There was mention of doing that
perhaps with
Post by Federico Miyara
some third party library. However I count that beyond 2.2.0
scope unless
Post by Federico Miyara
someone surprises me.
Or a user might reasonably expect as Steve says that these
timeline changes
Post by Federico Miyara
apply to MIDI events, thus changing tempo only. But what then
should it
Post by Federico Miyara
mean when the selection to play includes a combination of Wave
and MIDI
Post by Federico Miyara
tracks?
Or would the ideal be to give the choice among these two
behaviors to the
Post by Federico Miyara
user?
The best simple answer to these questions in 2.2.0 is simply to
evade them.
Post by Federico Miyara
Just disallow MIDI playback in such cases. Should that pop up a
warning or
Post by Federico Miyara
just silently exclude the MIDI tracks from the playback?
PRL
------------------------------------------------------------------------------
Post by Federico Miyara
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
<https://lists.sourceforge.net/lists/listinfo/audacity-devel>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
<https://lists.sourceforge.net/lists/listinfo/audacity-devel>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Gale Andrews
2017-06-07 02:04:09 UTC
Permalink
Post by Paul Licameli
Post by Gale Andrews
So, the simplest option, although audio Play-at-Speed without
You meant "with" ?
I meant as I wrote ( speed change without pitch change ) for
audio Play-at-Speed. This would be a time saving e.g. for
transcribers who slow down playback but find it hard to work
with the pitch drop.

In other words, like the "Playing Speed" slider in "Best Practice":
http://bestpractice.sourceforge.net/

(the project seems dead now).



Gale
Post by Paul Licameli
Post by Gale Andrews
pitch change would IMO be very desirable, is to accept that
Play-at-Speed for MIDI just "moves the score faster".
Gale
A user might expect scrubbing, or play-at-speed, or nontrivial time track,
simply to apply to the as-rendered sound. To do that would require us first
to render MIDI for ourselves. There was mention of doing that perhaps with
some third party library. However I count that beyond 2.2.0 scope unless
someone surprises me.
Or a user might reasonably expect as Steve says that these timeline changes
apply to MIDI events, thus changing tempo only. But what then should it
mean when the selection to play includes a combination of Wave and MIDI
tracks?
Or would the ideal be to give the choice among these two behaviors to the
user?
The best simple answer to these questions in 2.2.0 is simply to evade them.
Just disallow MIDI playback in such cases. Should that pop up a warning or
just silently exclude the MIDI tracks from the playback?
PRL
Post by Gale Andrews
Post by Steve the Fiddle
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs.
We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Robert Hänggi
2017-06-06 18:39:52 UTC
Permalink
Post by Steve the Fiddle
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
Important to remember that MIDI is not audio.
When the speed of audio is increased, it affects both tempo and pitch,
but MIDI is a list of commands, so if you play the list faster, it
just changes the rate at which the commands occur. Changing the play
speed of MIDI does not and should not change the messages, just the
speed at which the messages are read.
Playing MIDI faster is like a music box playing faster, or playing a
piano score faster.
To change the pitch, you would either "transform" the MIDI events, or
send pitch bend controller messages, or a combination of the two.
Pitch bend messages are sent as a two byte message to a specified
channel. The resulting change in pitch depends on the synth / sampler
and patch settings.
Steve
It was a pleasant surprise to me that play-atspeed worked and that it
didn't change the pitch.
That's actually what the normal behaviour should be for a
"Transcription tool", be it audio or Midi.
Transposing is difficult, as Steve pointed out.
For instance, you can't do it to the drum channel since every pitch
has its own instrument. Not all SoundFonts are general Midi and so the
channel reserved is not clear at all.
Of course, we have eventually to provide some mean to transpose a
channel but not yet.


What about the velocity sliders, are they available for keyboard users already?
We should at least provide the means to change velocity on the focused
track (same three shortcuts as for gain).

Robert
Post by Steve the Fiddle
Post by Gale Andrews
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs. We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Federico Miyara
2017-06-07 00:26:22 UTC
Permalink
Dear all,

Just a thought. Pitch change is actually a speed-change artifact of the
tape recording era. Except for the special case where one intends to
emulate that effect (Hal 9000's final "Daisy" in "2001: A space Odissey"
is a good example), in MIDI one would use a change of speed for instance
to listen to a slow-motion version of a song, but without any pitch
change. In digital audio it is difficult and with several artifacts that
have been discussed here, but in MIDI is as natural as to slow down the
tempo in an acoustic instrument.

Of course, if besides the "natural" option (that should be the default
one) it is possible to provide also pitch change, no one would complain,
I believe.

Regards,

Federico
Post by Gale Andrews
I'm starting an open thread here for discussing outstanding obstacles to the
MIDI playback project.
I am not the expert in the topic and I hope to draw on others' knowledge.
I reviewed Pokechu22's earlier efforts and I think I explained why
synchronization of loop playback with Audacity's playback cursor does not
work.
Making it interact well with play-at-speed and with scrubbing may be
difficult, but may be dispensible for a first release of the feature.
If MIDI playback does interact with these things, should it change pitch,
not just tempo?
I don't see it as a release blocker if Play-at-speed is disabled for
MIDI_OUT first time around.
I think a better question may be - can we provide Play-at-Speed
options for pitch-changed playback and not, and then Play-at-Speed
(to the user) does the same for MIDI playback as it does for audio
playback.
EXPERIMENTAL_MIDI_OUT fails build with link errors on Linux. I think the
makefiles simply never instruct the Linux build to compile the portmidi
library. I am not adept enough with Linux building to figure that out but I
think it should not be difficult. It just needs to do something analogous
with what we do for other lib-src.
I have had no success making installations of MIDI drivers on macOs. We
will likely need some FAQ or manual page explaining how to do this.
I tried to install MIDI playback on Mac but cannot test it in Audacity.
I may have two competing MIDI playback systems that are
un-necessary and I only need one of them.
Exactly where do I enable MIDI OUT for Audacity on Mac?
Gale
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Loading...