Skip to content

Commit

Permalink
Merge pull request #3200 from sonic-pi-net/dev
Browse files Browse the repository at this point in the history
Release v4.1
  • Loading branch information
samaaron committed Aug 30, 2022
2 parents d3179d0 + c1065bf commit 78f0a98
Show file tree
Hide file tree
Showing 115 changed files with 15,897 additions and 14,066 deletions.
40 changes: 38 additions & 2 deletions CHANGELOG.md
@@ -1,4 +1,5 @@
# History
* [v4.1.0 'Phase'](#v4.1.0), 30th August 2022
* [v4.0.3 'Dovetail'](#v4.0.3), 18th July 2022
* [v4.0.2 'Relink'](#v4.0.2), 15th July 2022
* [v4.0.1 'Verknüpfen'](#v4.0.1), 12th July 2022
Expand Down Expand Up @@ -27,6 +28,43 @@
* [v2.0.1](#v2.0.1), 9th Sept, 2014
* [v2.0 'Phoenix'](#v2.0), 2nd Sept, 2014

<a name="v4.1.0"></a>

## Version 4.1.0 'Phase'
30th August 2022
<!-- [(view commits)](https://github.com/sonic-pi-net/sonic-pi/commits/v4.1.0): -->

The release of v4 of Sonic Pi introduced the ability to change the tempo of live running code to an external beat. This is possible either by setting the tempo manually to a specific BPM (Beats Per Minute) or by using the Tap Tempo button to tap along to an external rhythm. However, even when you do this, it's quite likely that things still don't sound quite right as there's a good chance that the two rhythms are out of phase despite being at the same tempo. This release introduces a new feature - Global Time Warp which lets you shift the phase of Sonic Pi's timing back or forward up to 250 milliseconds to let you align it with an external rhythm.

Taking a quick step back, what does it mean for two rhythms to be out of phase and why is it a problem? Imagine you had two metronomes ticking away. If one has a higher tempo than the other, then one will be ticking faster than the other. This can be fixed by setting the tempos to be the same. However, unless they were both started at exactly the same time, they both wont be ticking at the same time. Instead, one will tick, then the other, then the first, then the second, etc. The second will always be a little later than the first and as they are at the same tempo, they will never catch up with each other, they will always tick at different times. This is called being out of phase. When two rhythms are out of phase it can sound very messy. Therefore, being able to get rhythms to start at exactly the same time is really important to being able to jam together and for it to sound good.

The new Global Time Warp control lets you shift the timing of all triggered synths, MIDI and OSC messages forwards or backwards by a specified time in milliseconds. You can either slide a slider or type in a specific time to adjust the phase of Sonic Pi's timing to match the phase of an external rhythm.

This means you can now easily jam to an external track - first by tapping out the tempo and then by shifting the phase using the new Global Time Warp controls until it sounds right. This is essentially what DJs do when they mix tracks together in a live set - only now you can layer coded rhythms, basslines and riffs on top of external music with code. This is not only a great way to perform live, but it's also a wonderful way to practice - by jamming along to music you love.

In addition to this, the accuracy of the Tap Tempo functionality has been improved in addition to UI tweaks to all the metronome controls.

Have fun jamming in phase to external music and take your live coding collaborations to the next level!


### GUI
* New Global Time Warp controls. This lets you adjust the timing of all scheduled events (synths, samples, MIDI and OSC) forwards or backwards up to 250 milliseconds. This is important for matching the phase of an external rhythm.
* Improved Tap Tempo logic aimed towards increased BPM detection accuracy and speed.
* BPM scrubber and new Global Time Warp scrubber now respond to mouse wheel changes.

### Improvements
* Clearly specify in the tutorial that user-defined function names should start with a lower case letter. Therefore use `define :foo` rather than `define :Foo`.

### Translations
* Minor improvements to the Indonesian, Korean Portuguese (Brazil) and Russian translations.

### Bugfixes
* The `duration:` opt for `midi_clock_beat` has been fixed.
* Fix `scsynth_opts` and `scsynth_opts_override` options in the `~/.sonic-pi/config/audio-settings.toml` config file.
* Audio output via external soundcards on macOS should now work without requiring audio inputs to be enabled in the GUI.
* `current_debug` now correctly returns `true` if logging/debug is enabled (the default). Previously it reported the inverse.
* Minor improvements to documentation layout.


<a name="v4.0.3"></a>

Expand All @@ -44,8 +82,6 @@ This is a minor bugfix and maintenance release.

### Bugfixes
* A regression in the function `midi_sysex` introduced in v4 has been resolved. `midi_sysex` can now be called as expected.


<a name="v4.0.2"></a>

## Version 4.0.2 'Relink'
Expand Down
16 changes: 11 additions & 5 deletions CONTRIBUTORS.md
Expand Up @@ -63,7 +63,7 @@ projects:
## Sponsors

The following organisations have financially supported the continued
developent and maintainence of Sonic Pi. We give our appreciation and
development and maintenance of Sonic Pi. We give our appreciation and
respect back to them all for choosing to support open source software:

* [Trading & Consulting 'H.P.C.' GmbH](https://www.hpc.at/)
Expand Down Expand Up @@ -248,7 +248,7 @@ thanks to the following developers who have donated their time and
effort to help grow and improve the Sonic Pi code base:


* [Sam Aaron](https://github.com/sonic-pi-net/sonic-pi/commits?author=samaaron) (5278)
* [Sam Aaron](https://github.com/sonic-pi-net/sonic-pi/commits?author=samaaron) (5304)
* [Ethan Crawford](https://github.com/sonic-pi-net/sonic-pi/commits?author=ethancrawford) (304)
* [Hanno Zulla](https://github.com/sonic-pi-net/sonic-pi/commits?author=hzulla) (198)
* [Joseph Wilk](https://github.com/sonic-pi-net/sonic-pi/commits?author=josephwilk) (160)
Expand All @@ -257,13 +257,13 @@ effort to help grow and improve the Sonic Pi code base:
* [SunderB](https://github.com/sonic-pi-net/sonic-pi/commits?author=SunderB) (96)
* [Robin Newman](https://github.com/sonic-pi-net/sonic-pi/commits?author=rbnpi) (85)
* [Łukasz Siwiński](https://github.com/sonic-pi-net/sonic-pi/commits?author=hopbit) (82)
* [Emlyn Corrin](https://github.com/sonic-pi-net/sonic-pi/commits?author=emlyn) (73)
* [Emlyn Corrin](https://github.com/sonic-pi-net/sonic-pi/commits?author=emlyn) (76)
* [Adrian Cheater](https://github.com/sonic-pi-net/sonic-pi/commits?author=factoid) (70)
* [Chris Maughan](https://github.com/sonic-pi-net/sonic-pi/commits?author=cmaughan) (66)
* [Lily Foster](https://github.com/sonic-pi-net/sonic-pi/commits?author=lilyinstarlight) (48)
* [Nicolas Dermine](https://github.com/sonic-pi-net/sonic-pi/commits?author=nicoder) (42)
* [Luis Lloret](https://github.com/sonic-pi-net/sonic-pi/commits?author=llloret) (41)
* [Martin Keegan](https://github.com/sonic-pi-net/sonic-pi/commits?author=mk270) (41)
* [Nicolas Dermine](https://github.com/sonic-pi-net/sonic-pi/commits?author=nicoder) (41)
* [Kenichi Kanai](https://github.com/sonic-pi-net/sonic-pi/commits?author=kn1kn1) (28)
* [Nikolaus Gradwohl](https://github.com/sonic-pi-net/sonic-pi/commits?author=ngradwohl) (26)
* [Ricardo Pozo](https://github.com/sonic-pi-net/sonic-pi/commits?author=thraex41) (23)
Expand Down Expand Up @@ -360,6 +360,7 @@ effort to help grow and improve the Sonic Pi code base:
* [Dionysis Zindros](https://github.com/sonic-pi-net/sonic-pi/commits?author=dionyziz) (1)
* [Dominic Calkosz](https://github.com/sonic-pi-net/sonic-pi/commits?author=Dmcdominic) (1)
* [Drew A. Moore](https://github.com/sonic-pi-net/sonic-pi/commits?author=moore-drew) (1)
* [Eduardo Fonseca](https://github.com/sonic-pi-net/sonic-pi/commits?author=edrd-f) (1)
* [Eric M](https://github.com/sonic-pi-net/sonic-pi/commits?author=em13914) (1)
* [Ezequiel Ramos](https://github.com/sonic-pi-net/sonic-pi/commits?author=ezequielramos) (1)
* [Fabian Aussems](https://github.com/sonic-pi-net/sonic-pi/commits?author=mozinator) (1)
Expand All @@ -371,10 +372,12 @@ effort to help grow and improve the Sonic Pi code base:
* [Guntitat Sawadwuthikul](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
* [Gábor Hermann](https://github.com/sonic-pi-net/sonic-pi/commits?author=gaborhermann) (1)
* [Hamidreza Montaseri](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
* [Himanshu](https://github.com/sonic-pi-net/sonic-pi/commits?author=himanshu007-creator) (1)
* [Hrafnkell Eiríksson](https://github.com/sonic-pi-net/sonic-pi/commits?author=hrafnkelle) (1)
* [Huiting Milewski](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
* [Hur Ezeiza Zaldua](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
* [Ian Stevenson](https://github.com/sonic-pi-net/sonic-pi/commits?author=irstevenson) (1)
* [Ikko Ashimine](https://github.com/sonic-pi-net/sonic-pi/commits?author=eltociear) (1)
* [Ioan Bizău](https://github.com/sonic-pi-net/sonic-pi/commits?author=ibz) (1)
* [Ivan Zarea](https://github.com/sonic-pi-net/sonic-pi/commits?author=minivan) (1)
* [James Smith](https://github.com/sonic-pi-net/sonic-pi/commits?author=nanomancer) (1)
Expand Down Expand Up @@ -598,6 +601,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
* Lupa Lupin (3)
* László van den Hoek (3)
* Moisés Cachay Tello (3)
* Moon Sungjoon (3)
* Nader Jafari (3)
* Nami KJ (3)
* Nathan Van der Auwera (3)
Expand Down Expand Up @@ -699,6 +703,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
* Tasos Protopapas (2)
* Tiago Naufragado (2)
* Tuomas Pyylampi (2)
* Umair Raihan (2)
* Vera Rojman (2)
* Vincent Renard (2)
* Vladimir Támara Patiño (2)
Expand All @@ -714,6 +719,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
* sharmer156 (2)
* tter (2)
* zmni (2)
* キツネさん (2)
* Aaro Asikainen (1)
* Adam Süki (1)
* AgentWu (1)
Expand Down Expand Up @@ -763,6 +769,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
* Evandro Afonso Rodrigues (1)
* Fabian Aussems (1)
* Federico Saccà (1)
* Felipe Kinoshita (1)
* Feodor Aleksandrov (1)
* Fernando Alberto Ribeiro Tavar (1)
* Filip Faste (1)
Expand Down Expand Up @@ -825,7 +832,6 @@ The following volunteers have generously helped to translate Sonic Pi into addit
* Michael Bölling (1)
* Miguel García (1)
* Mikkel Gravgaard (1)
* Moon Sungjoon (1)
* Mui Kai En (1)
* Nadezhda Ratckevich (1)
* Narek Torosyan (1)
Expand Down
1 change: 1 addition & 0 deletions app/api/include/api/sonicpi_api.h
Expand Up @@ -290,6 +290,7 @@ class SonicPiAPI
virtual bool LinkDisable();

virtual bool SetLinkBPM(double bpm);
virtual void SetGlobalTimeWarp(double time);

// Wait for the server to be in a good state
virtual bool PingUntilServerCreated();
Expand Down
11 changes: 10 additions & 1 deletion app/api/src/sonicpi_api.cpp
Expand Up @@ -338,7 +338,7 @@ bool SonicPiAPI::LinkEnable()
return true;
}

bool SonicPiAPI::SetLinkBPM(double bpm)
bool SonicPiAPI::SetLinkBPM(double bpm)
{
Message msg("/link-set-tempo");
msg.pushFloat((float) bpm);
Expand Down Expand Up @@ -452,6 +452,15 @@ bool SonicPiAPI::StartOscServer()
return true;
}

void SonicPiAPI::SetGlobalTimeWarp(double time)
{
Message msg("/set-global-timewarp");
msg.pushInt32(m_token);
msg.pushFloat((float) time);
SendOSC(msg);
return;
}

bool SonicPiAPI::SendOSC(Message m)
{

Expand Down
4 changes: 3 additions & 1 deletion app/gui/qt/CMakeLists.txt
Expand Up @@ -5,7 +5,7 @@ message(STATUS "CMakeLists: Sonic Pi Qt GUI")
project("Sonic Pi"
LANGUAGES CXX C
DESCRIPTION "A code-based music creation and performance tool"
VERSION 4.0.3
VERSION 4.1.0
HOMEPAGE_URL "https://sonic-pi.net"
)

Expand Down Expand Up @@ -107,6 +107,8 @@ set(SOURCES
${QTAPP_ROOT}/widgets/sonicpicontext.h
${QTAPP_ROOT}/widgets/sonicpimetro.cpp
${QTAPP_ROOT}/widgets/sonicpimetro.h
${QTAPP_ROOT}/widgets/timewarpedit.h
${QTAPP_ROOT}/widgets/timewarpedit.cpp
${QTAPP_ROOT}/widgets/sonicpieditor.cpp
${QTAPP_ROOT}/widgets/sonicpieditor.h
${QTAPP_ROOT}/utils/scintilla_api.h
Expand Down
3 changes: 3 additions & 0 deletions app/gui/qt/dpi.h
Expand Up @@ -115,6 +115,9 @@ inline QString ScalePxInStyleSheet(QString style)
style = style.replace(QRegularExpression(":\\s*7\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(70)));
style = style.replace(QRegularExpression(":\\s*8\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(80)));
style = style.replace(QRegularExpression(":\\s*9\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(90)));
style = style.replace(QRegularExpression(":\\s*1[1]\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(110)));
style = style.replace(QRegularExpression(":\\s*1[234]\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(125)));
style = style.replace(QRegularExpression(":\\s*1[56789]\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(150)));
style = style.replace(QRegularExpression(":\\s*1\\d\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(100)));
style = style.replace(QRegularExpression(":\\s*2\\d\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(200)));
style = style.replace(QRegularExpression(":\\s*3\\d\\ddx"), QString(": %1px").arg(ScaleHeightForDPI(300)));
Expand Down
2 changes: 1 addition & 1 deletion app/gui/qt/html/doc.html
Expand Up @@ -15,7 +15,7 @@
code_as <span class="highlight">:art</span></pre>
</p>

<p class="version">v4.0.3</p>
<p class="version">v4.1.0</p>

</center>

Expand Down
2 changes: 1 addition & 1 deletion app/gui/qt/html/info.html
Expand Up @@ -29,6 +29,6 @@

<br/>

<p class="version">v4.0.3</p>
<p class="version">v4.1.0</p>
</center>
</body>
Binary file modified app/gui/qt/images/splash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/gui/qt/images/splash2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/gui/qt/images/splash@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 78f0a98

Please sign in to comment.