Skip to content

Commit 5f7a7e7

Browse files
committed
Merge branch 'dev' into translations
2 parents b3690b2 + 0b80902 commit 5f7a7e7

File tree

8 files changed

+70
-18
lines changed

8 files changed

+70
-18
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Compiled Dynamic libraries
1010
*.so
1111
*.dylib
12+
*.dll
1213

1314
# Compiled Static libraries
1415
*.lai
@@ -18,6 +19,9 @@
1819
# Compiled Erlang files
1920
*.beam
2021

22+
# Library files
23+
*.lib
24+
2125
# MSVC stuff
2226
*.Debug
2327
*.Release

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# History
2+
* [v4.0.2 'Relink''](#v4.0.2), 15th July 2022
23
* [v4.0.1 'Verknüpfen'](#v4.0.1), 12th July 2022
34
* [v4.0.0 'Link'](#v4.0.0), 6th July, 2022
45
* [v3.3.1 'Beamer'](#v3.3.1), 1st Feb, 2021
@@ -25,6 +26,25 @@
2526
* [v2.0.1](#v2.0.1), 9th Sept, 2014
2627
* [v2.0 'Phoenix'](#v2.0), 2nd Sept, 2014
2728

29+
<a name="v4.0.2"></a>
30+
31+
## Version 4.0.2 'Relink'
32+
15th July 2022
33+
<!-- [(view commits)](https://github.com/sonic-pi-net/sonic-pi/commits/v4.0.2): -->
34+
35+
Hot on the heals of v4.0.1 here's another bugfix release addressing an issue with the translations.
36+
37+
During the last year there has been significant upheaval of the process used to build Sonic Pi. Somehow, during this upheaval, the translations never got added into the final release builds, despite being part of the dev builds. This has been true since v4.0 BETA 1 back in August 2021 - yet it somehow went unnoticed until now. Apologies! This release fixes this and re-introduces the translations which are so important for lowering the barrier to entry across the world.
38+
39+
As a bonus, a couple of nice improvements also managed to sneak in for good measure. Have fun!
40+
41+
### GUI
42+
* All the translations are now available again - including the vast amount of new translation effort since v3.3.1 was released.
43+
* Loading a file no longer erases the undo history. This means that you can now "undo" a file load in the current buffer and return it to the state prior to the load.
44+
* The BPM-scrubbing behaviour (clicking your mouse and dragging to change the BPM) has been tweaked to make it easier to use.
45+
* Improvements for the Portuguese translation.
46+
47+
2848
<a name="v4.0.1"></a>
2949

3050
## Version 4.0.1 'Verknüpfen'
@@ -37,6 +57,7 @@ We also sadly say goodbye to Core Team member Hanno Zulla who did amazing work w
3757

3858
This release also includes Italian and Polish translation updates.
3959

60+
4061
<a name="v4.0.0"></a>
4162

4263
## Version 4.0.0 'Link'

CONTRIBUTORS.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,22 +248,22 @@ thanks to the following developers who have donated their time and
248248
effort to help grow and improve the Sonic Pi code base:
249249

250250

251-
* [Sam Aaron](https://github.com/sonic-pi-net/sonic-pi/commits?author=samaaron) (5256)
251+
* [Sam Aaron](https://github.com/sonic-pi-net/sonic-pi/commits?author=samaaron) (5264)
252252
* [Ethan Crawford](https://github.com/sonic-pi-net/sonic-pi/commits?author=ethancrawford) (304)
253253
* [Hanno Zulla](https://github.com/sonic-pi-net/sonic-pi/commits?author=hzulla) (198)
254254
* [Joseph Wilk](https://github.com/sonic-pi-net/sonic-pi/commits?author=josephwilk) (160)
255255
* [Jeremy Weatherford](https://github.com/sonic-pi-net/sonic-pi/commits?author=jweather) (123)
256256
* [Xavier Riley](https://github.com/sonic-pi-net/sonic-pi/commits?author=xavriley) (110)
257-
* [Robin Newman](https://github.com/sonic-pi-net/sonic-pi/commits?author=rbnpi) (84)
258-
* [SunderB](https://github.com/sonic-pi-net/sonic-pi/commits?author=SunderB) (82)
257+
* [SunderB](https://github.com/sonic-pi-net/sonic-pi/commits?author=SunderB) (96)
258+
* [Robin Newman](https://github.com/sonic-pi-net/sonic-pi/commits?author=rbnpi) (85)
259259
* [Łukasz Siwiński](https://github.com/sonic-pi-net/sonic-pi/commits?author=hopbit) (82)
260260
* [Adrian Cheater](https://github.com/sonic-pi-net/sonic-pi/commits?author=factoid) (70)
261-
* [Emlyn Corrin](https://github.com/sonic-pi-net/sonic-pi/commits?author=emlyn) (69)
261+
* [Emlyn Corrin](https://github.com/sonic-pi-net/sonic-pi/commits?author=emlyn) (70)
262262
* [Chris Maughan](https://github.com/sonic-pi-net/sonic-pi/commits?author=cmaughan) (66)
263+
* [Lily Foster](https://github.com/sonic-pi-net/sonic-pi/commits?author=lilyinstarlight) (48)
263264
* [Luis Lloret](https://github.com/sonic-pi-net/sonic-pi/commits?author=llloret) (41)
264265
* [Martin Keegan](https://github.com/sonic-pi-net/sonic-pi/commits?author=mk270) (41)
265266
* [Nicolas Dermine](https://github.com/sonic-pi-net/sonic-pi/commits?author=nicoder) (41)
266-
* [Lily Foster](https://github.com/sonic-pi-net/sonic-pi/commits?author=lilyinstarlight) (39)
267267
* [Kenichi Kanai](https://github.com/sonic-pi-net/sonic-pi/commits?author=kn1kn1) (28)
268268
* [Nikolaus Gradwohl](https://github.com/sonic-pi-net/sonic-pi/commits?author=ngradwohl) (26)
269269
* [Ricardo Pozo](https://github.com/sonic-pi-net/sonic-pi/commits?author=thraex41) (23)
@@ -401,8 +401,8 @@ effort to help grow and improve the Sonic Pi code base:
401401
* [Lucas Cruz dos Reis](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
402402
* [Madis Liias](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
403403
* [Mahmutcan İlhandağ](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
404-
* [Manula Thejan](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
405404
* [Manula Thejan](https://github.com/sonic-pi-net/sonic-pi/commits?author=manula2004) (1)
405+
* [Manula Thejan](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
406406
* [Marko Peltola](https://github.com/sonic-pi-net/sonic-pi/commits?author=markopeltola) (1)
407407
* [Martin Gondermann](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
408408
* [Mateo Carreras](https://github.com/sonic-pi-net/sonic-pi/commits?author=) (1)
@@ -593,6 +593,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
593593
* Jiaxi Gu (3)
594594
* Juan Pablo Riaño (3)
595595
* Jun Lin (3)
596+
* Lucas Cruz dos Reis (3)
596597
* Luis Lloret (3)
597598
* Lupa Lupin (3)
598599
* László van den Hoek (3)
@@ -665,7 +666,6 @@ The following volunteers have generously helped to translate Sonic Pi into addit
665666
* Lorenzo Bloedow (2)
666667
* Louies (2)
667668
* Louis Wolf (2)
668-
* Lucas Cruz dos Reis (2)
669669
* Luis Jimenez (2)
670670
* Lukas Spee (2)
671671
* Lázaro Henrique (2)
@@ -760,6 +760,7 @@ The following volunteers have generously helped to translate Sonic Pi into addit
760760
* Elijah Grapes (1)
761761
* Elizabeth Sherrock (1)
762762
* Enrike Hurtado (1)
763+
* Evandro Afonso Rodrigues (1)
763764
* Fabian Aussems (1)
764765
* Federico Saccà (1)
765766
* Feodor Aleksandrov (1)

app/external/sp_link/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ endif(MSVC)
7878

7979
if(APPLE)
8080
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libsp_link.dylib DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME libsp_link.so)
81+
elseif(MSVC)
82+
install(TARGETS libsp_link RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
8183
else()
8284
install(TARGETS libsp_link LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX})
8385
endif()

app/external/sp_midi/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ endif(MSVC)
9494

9595
if(APPLE)
9696
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libsp_midi.dylib DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME libsp_midi.so)
97+
elseif(MSVC)
98+
install(TARGETS libsp_midi RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
9799
else()
98100
install(TARGETS libsp_midi LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX})
99101
endif()

app/server/ruby/lib/sonicpi/lang/core.rb

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,9 @@ def define(name, &block)
27512751
raise ArgumentError, "A function called #{name} is already part of Sonic Pi's core API. Please choose another name."
27522752
end
27532753

2754-
raise ArgumentError, "Function names can't start with a capital letter." if name.to_s =~ /^[A-Z]/
2754+
if block.arity == 0 && name.to_s =~ /^[A-Z]/
2755+
__delayed_warning "Functions with no required parameters shouldn't start with a capital letter."
2756+
end
27552757

27562758
if already_defined
27572759
__info "Redefining fn #{name.inspect}"
@@ -2768,7 +2770,9 @@ def define(name, &block)
27682770
accepts_block: true,
27692771
requires_block: true,
27702772
intro_fn: true,
2771-
doc: "Allows you to group a bunch of code and give it your own name for future re-use. Functions are very useful for structuring your code. They are also the gateway into live coding as you may redefine a function whilst a thread is calling it, and the next time the thread calls your function, it will use the latest definition.",
2773+
doc: "Allows you to group a bunch of code and give it your own name for future re-use. Functions are very useful for structuring your code. They are also the gateway into live coding as you may redefine a function whilst a thread is calling it, and the next time the thread calls your function, it will use the latest definition.
2774+
2775+
Note, it is not recommended to start a function name with a capital letter if it takes no parameters.",
27722776
examples: ["
27732777
# Define a new function called foo
27742778
define :foo do
@@ -2783,7 +2787,16 @@ def define(name, &block)
27832787
# For example, in a block:
27842788
3.times do
27852789
foo
2786-
end",]
2790+
end",
2791+
2792+
"
2793+
# Define a new function called play2, taking one parameter
2794+
define :play2 do |x|
2795+
play x, release: 2
2796+
end
2797+
2798+
# Call play2, passing in a value for the parameter
2799+
play2 42"]
27872800

27882801

27892802

@@ -4085,13 +4098,13 @@ def beat
40854098
opts: nil,
40864099
accepts_block: false,
40874100
examples: ["
4088-
use_bpm 120 # The current BPM makes no difference
4089-
puts beat #=> 0
4090-
sleep 1
4091-
puts beat #=> 1
4092-
use_bpm 2000
4093-
sleep 2
4094-
puts beat #=> 3"]
4101+
use_bpm 120 #=> The initial beat does not start at 0
4102+
puts beat #=> 109252.703125
4103+
sleep 1
4104+
puts beat #=> 109253.703125
4105+
use_bpm 2000 # Changing the BPM makes no difference
4106+
sleep 2
4107+
puts beat #=> 109255.703125"]
40954108

40964109

40974110

app/server/ruby/lib/sonicpi/lang/midi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ def __midi_send_timed_param_4(path, a, b, c, d)
15991599

16001600
def __midi_send_timed_param_n(path, *args)
16011601
t = __get_spider_schedule_time
1602-
@tau_api.send_midi_at(t, path *args)
1602+
@tau_api.send_midi_at(t, path, *args)
16031603
end
16041604

16051605
def __midi_message(m)

app/server/ruby/test/lang/core/test_sleep.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,14 @@ def test_bpm_scaled_sleep
4242
end
4343
end
4444

45+
def test_beat
46+
@lang.run do
47+
use_bpm 60
48+
assert_equal beat, 0
49+
sleep 2
50+
assert_equal beat, 2
51+
end
52+
end
53+
4554
end
4655
end

0 commit comments

Comments
 (0)