<div dir="ltr"><div>Update!</div><div>Now that music_sdl2 is the default almost everywhere, loop points in ogg files are a reality!<br></div><div>SDL_mixer 2.0.5 is still unreleased since my emails in 2019, but I imagine is not long off. It supports the more flexible LOOPSTART format loop point in ogg, flac and opus. Also, it turns out that SDL_mixer has supported "smpl" loop points in wav files since 2.0.1. smpl loop points are far more flexible: you can have multiple loops and each can loop a finite number of times, and it doesn't affect the loop count for the overall track. (If you ask SDL_Mixer to play a looped ogg n times then it will play the loop n times, continue to the end of the track, and stop.) Looping not supported in MP3.<br></div><div><br></div><div>It would be pretty straightfoward to translate an infinite smpl loop point to ogg when encoding it, by taking the smpl parsing code from SDL_mixer.  Maybe not very useful though.</div><div><br></div><div>I don't yet know how we could add loop point metadata to an existing ogg. And helping the user to pick a good loop point is something that could be best done by an external tool anyway, though I still think something primitive would be nice to have in Custom.<br></div><div><br></div><div>Also, I bumped the bugzilla bug about modplug loop points and they enabled them in both SDL_mixer 1.2 and 2.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 Nov 2019 at 14:27, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Yes, that's the core difference between GPL and LGPL.<br></div><div><br></div><div>I was interested in it on Android for the MIDI synths. If we had a OPL3-synth-based BAM player, we would ideally want to be able to use it everywhere, including possibly GPL-problematic platforms. However I'd think no one is going to be using BAM files in a Switch or Steam game, so such a restriction would be bearable.<br></div><div>On the other hand there are non-GPL OPL3 synths we could use instead for BAM: <a href="https://doomwiki.org/wiki/OPL_emulation#OPL_emulators" target="_blank">https://doomwiki.org/wiki/OPL_emulation#OPL_emulators</a></div><div>And, I still think implementing a BAM player is a quite bad use of time. It's only for fun.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 Nov 2019 at 13:35, James Paige <<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>I must have been confusing the LGPL rules.</div><div dir="auto"><br></div><div dir="auto">What was the reason for wanting SDL Mixer X on Android, just for the Midi/BAM synths?<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2019, 6:57 PM Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You can't dynamically link to a GPL library without the whole program being GPL.</div><div><br></div><div>I haven't forgotten about the relicensing either, I need to send that email.<br></div><div><br></div><div>It would be rare that someone would be using a backend without loop point support (eg non-MIDI audio don't even work in music_native/native2 on Windows currently; noone is using them), but that warning would be a good idea.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 Nov 2019 at 01:53, James Paige <<a href="mailto:Bob@hamsterrepublic.com" rel="noreferrer" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">The loop support thing sounds cool. I like the idea of in editor support, although we'll probably also want some in-editor warning text to let people know that support is dependent on backend.<div dir="auto"><br></div><div dir="auto">As for the relicensing, I haven't forgotten about that. I do still want to do it.</div><div dir="auto"><br></div><div dir="auto">Could using a GPL3 licenced music library work better if it was a dynamic library, for greater separation? Sort of like how gfx_directx is implemented as a dll?</div><div dir="auto"><br></div><div dir="auto">---</div><div dir="auto">James</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2019, 6:33 AM Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" rel="noreferrer" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I know I've discussed this before, but apparently not on the mailinglist.</div><div><br></div><div>SDL_Mixer 2 added support for .ogg loop points a couple of years ago. (Strangely it's not in the changelog)<br></div><div></div><div><div><br></div><div>Loop points work as LOOPSTART and LOOPEND or LOOPLENGTH (optional) comments embedded in the .ogg file. LOOPSTART+LOOPLENGTH is RPG Maker-compatible.</div><div><br></div><div>Within the last few days to weeks, more stuff has landed in SDL_mixer hg.</div><div>-loop points in FLAC files (note: I compiled sdl_mixer.dll without FLAC support)<br></div><div>-loop points can now be expressed in hh:mm:ss notation, or named LOOP_START or LOOP-START, for compatibility with Doom source ports  <a href="https://zdoom.org/wiki/Audio_loop" rel="noreferrer noreferrer" target="_blank">https://zdoom.org/wiki/Audio_loop</a></div><div>-loop points now respect the number of times we asked SDL_mixer to loop the song. I believe after that number of loops, it'll proceed past LOOPEND to the end, and then stop (not loop to beginning). Someone could always submit a patch for another comment controlling a separate loop count.<br></div><div><br></div><div>So I would like to add the ability to edit loop-points right in the music import menu.<br></div><div><br></div><div>We already have code for adding comments to an .ogg file when converting .mp3 to .ogg, but it seems to oggenc can't be used to add comments to an existing ogg file. Instead, the vorbiscomment program (part of vorbis-tools) does that. Another 186kB download<a href="http://www.rarewares.org/files/ogg/vorbiscomment-1.2.0.zip" rel="noreferrer noreferrer" target="_blank">.<br></a></div></div><div></div><div></div><div><br></div><div>=== SDL_mixer 1.2 ===<br></div><div><br></div><div>Loop points aren't in SDL_mixer 1.2. There hasn't been an update to SDL_mixer 1.2 since 2012, but it looks like they're preparing a bugfix one, including a number of backported loop-related bugfixes. It's certainly not getting any features.<br></div><div><div><br></div><div>There are only a couple bugs that I'm aware of left in gfx_sdl2; I'd like to fix them and switch to it as default on Mac, Linux and Windows after Fufluns is released</div></div><div><br></div><div>However the ogg loop stuff is spread over just a few of commits and should be very easy to backport to SDL_mixer 1.2, for our own build of sdl_mixer.dll (for people who want to stick to gfx_sdl instead of gfx_sdl2 for whatever reason) and also for the android port.<br></div><div><br></div><div>=== SDL_mixer X ===<br></div><div><br></div><div>Loop points were first implemented in SDL_mixer X, which is a fork of SDL_mixer 2, which has a number of interesting features.<br></div><div><a href="https://wohlsoft.github.io/SDL-Mixer-X/" rel="noreferrer noreferrer" target="_blank">https://wohlsoft.github.io/SDL-Mixer-X/</a></div><div><br></div><div>Most notably, it supports many more module formats and has ADLMIDI (OPL3) and OPNMIDI OPN2 synthesizer-based MIDI players, which could be used to play MIDI on Android or elsewhere without needing soundfonts. Sounds different to MIDI playback with a soundfont, but I think in most case ADLMIDI not bad (except percussion maybe). These both also support controller  111-based loop points (RPG Maker-compatible), just like music_native/native2 do. They could also be used to implement true BAM playback. (ADLMIDI contains at least two OPL3 synthesizers: Nuked and DOSbox)</div><div><br></div><div>But these synths are GPLv3+ licensed, which is a problem (inhibiting relicensing of the engine). So maybe we could use it just on Android for MIDI playback, and not for BAM. iOS has MIDI support builtin.<br></div></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
</blockquote></div>