midinous 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/midinous/canvas.rb +4 -8
- data/lib/midinous/init.rb +6 -6
- data/lib/midinous/key_bindings.rb +3 -1
- data/lib/midinous/points.rb +79 -43
- data/lib/midinous/proc_midi.rb +4 -3
- data/lib/midinous/style/midinous.glade +1 -0
- data/lib/midinous/style/ui.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf08999ac0cbc7bd36e95f88b35999c1ad6b2985be561b6846e30aad33ddbcdd
|
4
|
+
data.tar.gz: 7181ad94c2ad63f02db79c56b80df38b87ab443e8ac21cfdd8c3240955e009d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd03a7213784933f9d07eceb7e233e60fa36e3dd169c42f0df1bc8cc4c7a97953adee1c9210592d8fdecb6cdbe56a69d5e887659bfa00256c580994a9c60e53
|
7
|
+
data.tar.gz: e114a4b58e831f28b5eb1f6b3f04ead3d5e6c7258ac56c2437d4b2e993392404fd39b2a8ac0c09aa44fa2f5e2c65980deed89ea37d23ef105727288b41d77b61
|
data/lib/midinous/canvas.rb
CHANGED
@@ -233,7 +233,7 @@ class Canvas_Control
|
|
233
233
|
UI::canvas.queue_draw
|
234
234
|
end
|
235
235
|
|
236
|
-
def canvas_press(event)
|
236
|
+
def canvas_press(obj,event)
|
237
237
|
UI::logic_controls.focus = true
|
238
238
|
case Active_Tool.tool_id
|
239
239
|
when 1
|
@@ -246,6 +246,7 @@ class Canvas_Control
|
|
246
246
|
when 4
|
247
247
|
@path_origin = [event.x,event.y]
|
248
248
|
end
|
249
|
+
obj.queue_draw
|
249
250
|
end
|
250
251
|
def canvas_drag(obj,event)
|
251
252
|
@dragging = false
|
@@ -294,10 +295,6 @@ class Canvas_Control
|
|
294
295
|
obj.queue_draw
|
295
296
|
end
|
296
297
|
|
297
|
-
def canvas_del
|
298
|
-
@nouspoints = Pl.delete_points(@nouspoints)
|
299
|
-
end
|
300
|
-
|
301
298
|
def canvas_bg_draw(cr)
|
302
299
|
# fill background with black
|
303
300
|
cr.set_source_rgb(BLACK)
|
@@ -375,12 +372,11 @@ class Canvas_Control
|
|
375
372
|
end
|
376
373
|
|
377
374
|
#Draw all the points and paths last
|
378
|
-
|
375
|
+
@nouspoints.each { |n| n.set_path_color }
|
379
376
|
@nouspoints.each { |n| n.path_draw(cr) }
|
380
|
-
@nouspoints.each { |n| n.caret_draw(cr)}
|
377
|
+
@nouspoints.each { |n| n.caret_draw(cr) }
|
381
378
|
@nouspoints.each { |n| n.draw(cr) }
|
382
379
|
|
383
|
-
|
384
380
|
end
|
385
381
|
end
|
386
382
|
|
data/lib/midinous/init.rb
CHANGED
@@ -42,7 +42,7 @@ class Init_Prog
|
|
42
42
|
apply_style(UI::hotkeys_window,@provider)
|
43
43
|
end
|
44
44
|
|
45
|
-
def grid_center
|
45
|
+
def grid_center
|
46
46
|
UI::canvas_h_adj.set_value(CANVAS_SIZE/3.1)
|
47
47
|
UI::canvas_v_adj.set_value(CANVAS_SIZE/2.4)
|
48
48
|
end
|
@@ -66,7 +66,6 @@ end
|
|
66
66
|
|
67
67
|
init = Init_Prog.new
|
68
68
|
Times = Time.new
|
69
|
-
#init.grid_center # Setting Grid Center here ensures the background always gets drawn first
|
70
69
|
|
71
70
|
module Event_Router
|
72
71
|
extend Key_Bindings
|
@@ -188,11 +187,12 @@ module Event_Router
|
|
188
187
|
UI::canvas_commands.connect(Gdk::Keyval::KEY_v,4,0) {Pl.paste_points if Active_Tool.tool_id == 1}
|
189
188
|
|
190
189
|
#Canvas Events
|
191
|
-
UI::canvas.signal_connect("button-press-event") { |obj, event| CC.canvas_press(event) }
|
190
|
+
UI::canvas.signal_connect("button-press-event") { |obj, event| CC.canvas_press(obj,event) }
|
192
191
|
UI::canvas.signal_connect("motion-notify-event") { |obj, event| CC.canvas_drag(obj,event) }
|
193
192
|
UI::canvas.signal_connect("button-release-event") { |obj, event| CC.canvas_release(obj,event) }
|
194
193
|
UI::canvas.signal_connect("draw") { |obj, cr| CC.canvas_draw(cr) }
|
195
|
-
UI::canvas.signal_connect("delete-selected
|
194
|
+
UI::canvas.signal_connect("delete-selected") {Pl.delete_points}
|
195
|
+
UI::canvas.signal_connect("mute-toggle") {Pl.mute_points}
|
196
196
|
UI::canvas.signal_connect("beat-up") {CC.canvas_grid_change("+")}
|
197
197
|
UI::canvas.signal_connect("beat-dn") {CC.canvas_grid_change("-")}
|
198
198
|
UI::canvas.signal_connect("beat-note-up") {CC.canvas_grid_change("++")}
|
@@ -201,8 +201,8 @@ module Event_Router
|
|
201
201
|
UI::canvas.signal_connect("cycle-play-mode-bck") {Pl.play_mode_rotate(-1)}
|
202
202
|
UI::canvas.signal_connect("cycle-play-mode-fwd") {Pl.play_mode_rotate(1)}
|
203
203
|
UI::canvas.signal_connect("set-start") {Pl.set_start}
|
204
|
-
UI::canvas.signal_connect("del-path-to") {Pl.delete_paths_to
|
205
|
-
UI::canvas.signal_connect("del-path-from") {Pl.delete_paths_from
|
204
|
+
UI::canvas.signal_connect("del-path-to") {Pl.delete_paths_to}
|
205
|
+
UI::canvas.signal_connect("del-path-from") {Pl.delete_paths_from}
|
206
206
|
UI::canvas.signal_connect("set-path-mode-h") {Pl.set_path_mode("horz")}
|
207
207
|
UI::canvas.signal_connect("set-path-mode-v") {Pl.set_path_mode("vert")}
|
208
208
|
UI::canvas.signal_connect("note-inc-up") {Pl.inc_note(1)}
|
@@ -29,7 +29,9 @@ module Key_Bindings
|
|
29
29
|
when 114, 112 # R or P (colemak)
|
30
30
|
UI::main_tool_4.signal_emit("keybinding-event") if CC.dragging == false
|
31
31
|
when 65535 # del
|
32
|
-
UI::canvas.signal_emit("delete-selected
|
32
|
+
UI::canvas.signal_emit("delete-selected")
|
33
|
+
when 109 # M
|
34
|
+
UI::canvas.signal_emit("mute-toggle")
|
33
35
|
when 116 # T
|
34
36
|
UI::path_builder.signal_emit("keybinding-event")
|
35
37
|
when 93 # ]
|
data/lib/midinous/points.rb
CHANGED
@@ -29,6 +29,7 @@ class Point_Logic
|
|
29
29
|
"Color",
|
30
30
|
"Path Mode",
|
31
31
|
"Signal Start",
|
32
|
+
"Mute",
|
32
33
|
"Play Mode"]
|
33
34
|
@prop_names_multi = ["Note",
|
34
35
|
"Velocity",
|
@@ -37,6 +38,7 @@ class Point_Logic
|
|
37
38
|
"Repeat",
|
38
39
|
"Color",
|
39
40
|
"Signal Start",
|
41
|
+
"Mute",
|
40
42
|
"Play Mode"]
|
41
43
|
@prop_names_adv = []
|
42
44
|
@prop_names_adv_multi = []
|
@@ -154,7 +156,7 @@ class Point_Logic
|
|
154
156
|
end
|
155
157
|
|
156
158
|
@paste_count = 0 if @copy_type == "copy"
|
157
|
-
delete_points
|
159
|
+
delete_points if @copy_type == "cut" && @paste_count == 0
|
158
160
|
@paste_count += 1
|
159
161
|
|
160
162
|
paste_pos = CC.mouse_last_pos
|
@@ -190,6 +192,7 @@ class Point_Logic
|
|
190
192
|
color_to_hex(point.default_color),
|
191
193
|
point.path_mode,
|
192
194
|
point.traveler_start,
|
195
|
+
point.mute,
|
193
196
|
point.play_modes[0]]
|
194
197
|
@prop_names.each do |v|
|
195
198
|
iter = UI::prop_list_model.append
|
@@ -214,6 +217,8 @@ class Point_Logic
|
|
214
217
|
points.find_all(&:selected).each {|p| equalizer << color_to_hex(p.default_color)}
|
215
218
|
when "Signal Start"
|
216
219
|
points.find_all(&:selected).each {|p| equalizer << p.traveler_start}
|
220
|
+
when "Mute"
|
221
|
+
points.find_all(&:selected).each {|p| equalizer << p.mute}
|
217
222
|
when "Play Mode"
|
218
223
|
points.find_all(&:selected).each {|p| equalizer << p.play_modes[0]}
|
219
224
|
when "Repeat"
|
@@ -283,7 +288,7 @@ class Point_Logic
|
|
283
288
|
UI::prop_mod_button.sensitive = true
|
284
289
|
else UI::prop_mod_button.sensitive = false
|
285
290
|
end
|
286
|
-
when "Signal Start"
|
291
|
+
when "Signal Start","Mute"
|
287
292
|
if signal_states.include? text
|
288
293
|
UI::prop_mod_button.sensitive = true
|
289
294
|
else UI::prop_mod_button.sensitive = false
|
@@ -326,9 +331,11 @@ class Point_Logic
|
|
326
331
|
when "Channel"
|
327
332
|
points.find_all(&:selected).each {|p| p.channel = UI::prop_mod.text.to_i}
|
328
333
|
when "X-coordinate"
|
329
|
-
points.find(&:selected).
|
334
|
+
temp_origin = points.find(&:selected).origin
|
335
|
+
points.find(&:selected).origin = [round_num_to_grid(UI::prop_mod.text.to_i),temp_origin[1]]
|
330
336
|
when "Y-coordinate"
|
331
|
-
|
337
|
+
temp_origin = points.find(&:selected).origin
|
338
|
+
points.find(&:selected).origin = [temp_origin[0],round_num_to_grid(UI::prop_mod.text.to_i)]
|
332
339
|
when "Color"
|
333
340
|
points.find_all(&:selected).each {|p| p.set_default_color(hex_to_color("##{UI::prop_mod.text}"))}
|
334
341
|
when "Path Mode"
|
@@ -340,6 +347,13 @@ class Point_Logic
|
|
340
347
|
when "false"
|
341
348
|
points.find_all(&:selected).each {|p| p.traveler_start = false}
|
342
349
|
end
|
350
|
+
when "Mute"
|
351
|
+
case UI::prop_mod.text
|
352
|
+
when "true"
|
353
|
+
points.find_all(&:selected).each {|p| p.mute = true}
|
354
|
+
when "false"
|
355
|
+
points.find_all(&:selected).each {|p| p.mute = false}
|
356
|
+
end
|
343
357
|
when "Play Mode"
|
344
358
|
if UI::prop_mod.text == "robin" || UI::prop_mod.text == "portal"
|
345
359
|
points.find_all(&:selected).each {|p| p.play_modes.rotate! until p.play_modes[0] == UI::prop_mod.text}
|
@@ -387,11 +401,9 @@ class Point_Logic
|
|
387
401
|
UI::canvas.queue_draw
|
388
402
|
end
|
389
403
|
end
|
390
|
-
def play_mode_set(mode)
|
391
|
-
return unless ["robin","portal","split","random"].find {|f| f
|
392
|
-
|
393
|
-
n.play_modes.rotate!(1) until n.play_modes[0] == mode
|
394
|
-
end
|
404
|
+
def play_mode_set(point,mode)
|
405
|
+
return unless ["robin","portal","split","random"].find {|f| f == mode}
|
406
|
+
point.play_modes.rotate!(1) until point.play_modes[0] == mode
|
395
407
|
end
|
396
408
|
def path_rotate(dir)
|
397
409
|
CC.nouspoints.find_all(&:selected).each do |n|
|
@@ -415,26 +427,41 @@ class Point_Logic
|
|
415
427
|
return points, false
|
416
428
|
end
|
417
429
|
|
418
|
-
def
|
419
|
-
|
420
|
-
|
421
|
-
|
430
|
+
def mute_points
|
431
|
+
CC.nouspoints.find_all(&:selected).each do |n|
|
432
|
+
case n.mute
|
433
|
+
when true
|
434
|
+
n.mute = false
|
435
|
+
when false
|
436
|
+
n.mute = true
|
437
|
+
end
|
438
|
+
UI::canvas.queue_draw
|
439
|
+
end
|
440
|
+
end
|
441
|
+
def delete_points
|
442
|
+
delete_paths_to
|
443
|
+
delete_paths_from
|
444
|
+
CC.nouspoints.reject!(&:selected)
|
422
445
|
UI::prop_list_model.clear
|
423
446
|
UI::prop_mod.text = ""
|
424
447
|
UI::canvas.queue_draw
|
425
|
-
return points
|
426
448
|
end
|
427
|
-
def delete_paths_to
|
428
|
-
|
429
|
-
|
449
|
+
def delete_paths_to
|
450
|
+
CC.nouspoints.find_all {|f| !f.path_to.length.zero? && f.selected == true}.each {|n| n.path_to.each {|b| b.path_from.reject! {|g| g == n }}}
|
451
|
+
CC.nouspoints.find_all {|f| !f.path_to.length.zero? && f.selected == true}.each do |n|
|
430
452
|
n.path_to = []
|
431
|
-
play_mode_set("robin")
|
453
|
+
play_mode_set(n,"robin")
|
432
454
|
end
|
433
455
|
UI::canvas.queue_draw
|
434
456
|
end
|
435
|
-
def delete_paths_from
|
436
|
-
|
437
|
-
|
457
|
+
def delete_paths_from
|
458
|
+
CC.nouspoints.find_all {|f| !f.path_from.length.zero? && f.selected == true}.each do |n|
|
459
|
+
n.path_from.each do |b|
|
460
|
+
b.path_to.reject! {|g| g == n }
|
461
|
+
play_mode_set(b,"robin") if b.path_to.length <= 1
|
462
|
+
end
|
463
|
+
end
|
464
|
+
CC.nouspoints.find_all {|f| !f.path_from.length.zero? && f.selected == true}.each {|n| n.path_from = []}
|
438
465
|
UI::canvas.queue_draw
|
439
466
|
end
|
440
467
|
|
@@ -459,6 +486,7 @@ class Point_Logic
|
|
459
486
|
CC.nouspoints.find_all(&:selected).each do |n|
|
460
487
|
if n.traveler_start == false
|
461
488
|
n.traveler_start = true
|
489
|
+
n.note = CC.root_note if n.note.to_s.match(/^([+]|-)[0-9]{1,2}$/)
|
462
490
|
elsif n.traveler_start == true
|
463
491
|
n.traveler_start = false
|
464
492
|
end
|
@@ -474,11 +502,11 @@ class NousPoint
|
|
474
502
|
attr_accessor :source, :color, :path_to, :path_from, :note, :x, :y,
|
475
503
|
:velocity, :duration, :default_color, :path_mode,
|
476
504
|
:traveler_start, :channel, :playing, :play_modes,
|
477
|
-
:path_to_memory, :repeat, :repeating,
|
505
|
+
:path_to_memory, :repeat, :repeating, :mute,
|
478
506
|
:use_rel, :selected, :save_id, :path_to_rels, :path_from_rels
|
479
507
|
attr_reader :pathable, :origin, :bounds
|
480
508
|
|
481
|
-
def initialize(o,save_id) #where the point was initially placed
|
509
|
+
def initialize(o,save_id) #where the point was initially placed, and a unique identifier
|
482
510
|
@dp = [4,8,10,12,14,16,20]
|
483
511
|
|
484
512
|
@x = o[0]
|
@@ -488,11 +516,11 @@ class NousPoint
|
|
488
516
|
@color = GREY #point color defaults to gray++
|
489
517
|
@path_color = CYAN
|
490
518
|
@default_color = GREY
|
491
|
-
@note = 60
|
492
|
-
@velocity = 100
|
493
|
-
@channel = 1
|
494
|
-
@duration = 1
|
495
|
-
@repeat = 0
|
519
|
+
@note = 60 #all notes start at middle c (C3), can be a note or a reference
|
520
|
+
@velocity = 100 # `` with 100 velocity
|
521
|
+
@channel = 1 # `` assigned to midi channel 1 (instrument 1, but we will refer to them as channels, not instruments)
|
522
|
+
@duration = 1 #length of note in grid points (should be considered beats)
|
523
|
+
@repeat = 0 #Number of times the node should repeat before moving on
|
496
524
|
@save_id = save_id
|
497
525
|
@play_modes = ["robin","split","portal","random"]
|
498
526
|
@traveler_start = false
|
@@ -502,6 +530,7 @@ class NousPoint
|
|
502
530
|
@source = false
|
503
531
|
@repeating = false
|
504
532
|
@use_rel = false
|
533
|
+
@mute = false
|
505
534
|
@path_to = [] #array of references to points that are receiving a path from this point
|
506
535
|
@path_to_memory = [] #memory of @path_to so that it can be reset upon stopping.
|
507
536
|
@path_to_rels = []
|
@@ -535,8 +564,6 @@ class NousPoint
|
|
535
564
|
file.write("#{@path_to_rels}<~>")
|
536
565
|
file.write("#{@path_from_rels}")
|
537
566
|
end
|
538
|
-
def read_props(file)
|
539
|
-
end
|
540
567
|
|
541
568
|
def not_selected
|
542
569
|
!@selected
|
@@ -585,6 +612,16 @@ class NousPoint
|
|
585
612
|
@color = c
|
586
613
|
@default_color = c
|
587
614
|
end
|
615
|
+
def set_path_color
|
616
|
+
case @play_modes[0]
|
617
|
+
when "robin","split"
|
618
|
+
@path_color = CYAN
|
619
|
+
when "portal"
|
620
|
+
@path_color = RED
|
621
|
+
when "random"
|
622
|
+
@path_color = VLET
|
623
|
+
end
|
624
|
+
end
|
588
625
|
def set_destination(diff) #sets a new origin for the point based on x,y coordinate differences
|
589
626
|
@x += diff[0]
|
590
627
|
@y += diff[1]
|
@@ -599,19 +636,20 @@ class NousPoint
|
|
599
636
|
@color = @default_color
|
600
637
|
end
|
601
638
|
|
602
|
-
def draw(cr)
|
639
|
+
def draw(cr) #point will always be drawn to this specification.
|
640
|
+
|
603
641
|
cr.set_source_rgba(@color[0],@color[1],@color[2],0.4)
|
642
|
+
|
604
643
|
if @traveler_start
|
605
644
|
traveler_start_draw(cr)
|
606
645
|
else
|
607
|
-
|
646
|
+
cr.rounded_rectangle(@x-@dp[1],@y-@dp[1],@dp[5],@dp[5],2,2) #slightly smaller rectangle adds 'relief' effect
|
608
647
|
end
|
609
648
|
cr.fill
|
610
649
|
|
611
650
|
cr.set_source_rgba(@color[0],@color[1],@color[2],1)
|
612
651
|
case @play_modes[0]
|
613
652
|
when "robin"
|
614
|
-
@path_color = CYAN
|
615
653
|
if @path_to.length > 1
|
616
654
|
cr.move_to(@x-8,@y)
|
617
655
|
cr.line_to(@x+6,@y-9)
|
@@ -628,7 +666,6 @@ class NousPoint
|
|
628
666
|
cr.fill
|
629
667
|
end
|
630
668
|
when "split"
|
631
|
-
@path_color = CYAN
|
632
669
|
cr.move_to(@x-8,@y)
|
633
670
|
cr.line_to(@x+6,@y-9)
|
634
671
|
cr.move_to(@x-8,@y)
|
@@ -636,12 +673,10 @@ class NousPoint
|
|
636
673
|
cr.set_line_width(2)
|
637
674
|
cr.stroke
|
638
675
|
when "portal"
|
639
|
-
@path_color = RED
|
640
676
|
cr.circle(@x,@y,6)
|
641
677
|
cr.set_line_width(2)
|
642
678
|
cr.stroke
|
643
679
|
when "random"
|
644
|
-
@path_color = VLET
|
645
680
|
cr.rectangle(@x-6,@y-2,8,8)
|
646
681
|
cr.rectangle(@x-2,@y-6,8,8)
|
647
682
|
cr.set_line_width(2)
|
@@ -649,7 +684,6 @@ class NousPoint
|
|
649
684
|
end
|
650
685
|
|
651
686
|
if @repeat > 0
|
652
|
-
#cr.move_to(@x-@dp[2],@y-@dp[2]) #top left of the point graphic
|
653
687
|
if @traveler_start
|
654
688
|
cr.move_to(@x+3,@y-@dp[2]-2)
|
655
689
|
cr.line_to(@x-2,-6+@y-@dp[2]-2)
|
@@ -675,6 +709,7 @@ class NousPoint
|
|
675
709
|
end
|
676
710
|
end
|
677
711
|
|
712
|
+
cr.set_dash([2,4],0) if @mute
|
678
713
|
if !@selected
|
679
714
|
if @traveler_start
|
680
715
|
traveler_start_draw(cr)
|
@@ -693,6 +728,7 @@ class NousPoint
|
|
693
728
|
end
|
694
729
|
cr.set_line_width(2)
|
695
730
|
cr.stroke
|
731
|
+
cr.set_dash([],0)
|
696
732
|
play_draw(cr) if @playing
|
697
733
|
repeat_draw(cr) if @repeating
|
698
734
|
end
|
@@ -945,7 +981,7 @@ class Traveler #A traveler handles the source note playing and creates another t
|
|
945
981
|
def play_note
|
946
982
|
queued_notes = []
|
947
983
|
CC.queued_note_plays.each {|q| queued_notes << [q.note,q.chan]}
|
948
|
-
CC.queued_note_plays << NoteSender.new(@played_note,@dest.channel,@dest.velocity) unless queued_notes.find {|f| @played_note == f[0] && @dest.channel == f[1]}
|
984
|
+
CC.queued_note_plays << NoteSender.new(@played_note,@dest.channel,@dest.velocity,@dest.mute) unless queued_notes.find {|f| @played_note == f[0] && @dest.channel == f[1]}
|
949
985
|
end
|
950
986
|
def play_relative
|
951
987
|
#search the current scales variable and round to nearest note.
|
@@ -973,7 +1009,7 @@ class Traveler #A traveler handles the source note playing and creates another t
|
|
973
1009
|
end
|
974
1010
|
|
975
1011
|
def queue_removal
|
976
|
-
CC.queued_note_stops << NoteSender.new(@played_note,@dest.channel,0)
|
1012
|
+
CC.queued_note_stops << NoteSender.new(@played_note,@dest.channel,0,@dest.mute)
|
977
1013
|
|
978
1014
|
@remove = true
|
979
1015
|
end
|
@@ -1005,7 +1041,7 @@ class Starter #A starter handles notes that are used as starting points for path
|
|
1005
1041
|
@travel_c += 1
|
1006
1042
|
if @travel_c == @duration
|
1007
1043
|
@srce.playing = false
|
1008
|
-
CC.queued_note_stops << NoteSender.new(@played_note,@srce.channel,0)
|
1044
|
+
CC.queued_note_stops << NoteSender.new(@played_note,@srce.channel,0,@srce.mute)
|
1009
1045
|
CC.repeaters << Repeater.new(@srce,@repeat,@played_note) if @repeat > 0
|
1010
1046
|
@remove = true
|
1011
1047
|
end
|
@@ -1026,7 +1062,7 @@ class Starter #A starter handles notes that are used as starting points for path
|
|
1026
1062
|
def play_note
|
1027
1063
|
queued_notes = []
|
1028
1064
|
CC.queued_note_plays.each {|q| queued_notes << [q.note,q.chan]}
|
1029
|
-
CC.queued_note_plays << NoteSender.new(@played_note,@srce.channel,@srce.velocity) unless queued_notes.find {|f| @played_note == f[0] && @srce.channel == f[1]}
|
1065
|
+
CC.queued_note_plays << NoteSender.new(@played_note,@srce.channel,@srce.velocity,@srce.mute) unless queued_notes.find {|f| @played_note == f[0] && @srce.channel == f[1]}
|
1030
1066
|
end
|
1031
1067
|
def play_relative
|
1032
1068
|
#search the current scales variable and round to nearest note.
|
@@ -1066,7 +1102,7 @@ class Repeater #A repeater handles notes that are set to repeat/arpeggiate. This
|
|
1066
1102
|
|
1067
1103
|
def repeat
|
1068
1104
|
if @timer == 0
|
1069
|
-
CC.queued_note_stops << NoteSender.new(@played_note,@srce.channel,0)
|
1105
|
+
CC.queued_note_stops << NoteSender.new(@played_note,@srce.channel,0,@srce.mute)
|
1070
1106
|
@srce.repeating = false
|
1071
1107
|
@remove = true
|
1072
1108
|
end
|
@@ -1080,7 +1116,7 @@ class Repeater #A repeater handles notes that are set to repeat/arpeggiate. This
|
|
1080
1116
|
def play_note
|
1081
1117
|
queued_notes = []
|
1082
1118
|
CC.queued_note_plays.each {|q| queued_notes << [q.note,q.chan]}
|
1083
|
-
CC.queued_note_plays << NoteSender.new(@played_note,@srce.channel,@srce.velocity) unless queued_notes.find {|f| @played_note == f[0] && @srce.channel == f[1]}
|
1119
|
+
CC.queued_note_plays << NoteSender.new(@played_note,@srce.channel,@srce.velocity,@srce.mute) unless queued_notes.find {|f| @played_note == f[0] && @srce.channel == f[1]}
|
1084
1120
|
end
|
1085
1121
|
|
1086
1122
|
end
|
data/lib/midinous/proc_midi.rb
CHANGED
@@ -101,17 +101,18 @@ end
|
|
101
101
|
|
102
102
|
class NoteSender
|
103
103
|
attr_reader :note, :chan, :vel
|
104
|
-
def initialize(note,chan,vel)
|
104
|
+
def initialize(note,chan,vel,mute)
|
105
105
|
@note = note
|
106
106
|
@chan = chan
|
107
107
|
@vel = vel
|
108
|
+
@mute = mute
|
108
109
|
end
|
109
110
|
|
110
111
|
def play
|
111
|
-
Pm.note_send(@chan,@note,@vel)
|
112
|
+
Pm.note_send(@chan,@note,@vel) unless @mute
|
112
113
|
end
|
113
114
|
def stop
|
114
|
-
Pm.note_rlse(@chan,@note)
|
115
|
+
Pm.note_rlse(@chan,@note) unless @mute
|
115
116
|
end
|
116
117
|
|
117
118
|
end
|
@@ -182,6 +182,7 @@ Q -- Select Tool - Box select or single select points
|
|
182
182
|
W -- Point Place Tool - Places a point
|
183
183
|
E -- Move Tool - moves selected points based on a stencil
|
184
184
|
R -- Path Tool - Select source point, select target points, push build path or hit 'T'
|
185
|
+
M -- Toggle mute on selected points
|
185
186
|
< and > -- Cycle Play Mode - between robin, portal (random, split, if more than one path is leaving a point)
|
186
187
|
, and . -- Cycle starting path if more than one path is leaving a point
|
187
188
|
+ and - -- add or subtract 1 from the currently selected points' note
|
data/lib/midinous/style/ui.rb
CHANGED
@@ -34,7 +34,8 @@ class GtkCanvas < Gtk::DrawingArea
|
|
34
34
|
def initialize
|
35
35
|
super()
|
36
36
|
end
|
37
|
-
define_signal('delete-selected
|
37
|
+
define_signal('delete-selected',nil,nil,nil)
|
38
|
+
define_signal('mute-toggle',nil,nil,nil)
|
38
39
|
define_signal('beat-up',nil,nil,nil)
|
39
40
|
define_signal('beat-dn',nil,nil,nil)
|
40
41
|
define_signal('beat-note-up',nil,nil,nil)
|
@@ -576,6 +577,11 @@ class UI_Elements
|
|
576
577
|
if choice == "yes"
|
577
578
|
case @current_window
|
578
579
|
when "new_confirm"
|
580
|
+
CC.nouspoints.each do |n|
|
581
|
+
n.traveler_start = false
|
582
|
+
n.path_to = []
|
583
|
+
n.path_from = []
|
584
|
+
end
|
579
585
|
CC.nouspoints = []
|
580
586
|
file_name.text = ""
|
581
587
|
CC.tempo = 120
|
@@ -624,6 +630,7 @@ class UI_Elements
|
|
624
630
|
|
625
631
|
operator = @current_file.sub("file:///","")
|
626
632
|
operator = operator.gsub("/","\\")
|
633
|
+
operator = operator.gsub("%20"," ")
|
627
634
|
|
628
635
|
IO.binwrite(operator, "")
|
629
636
|
save = File.open(operator, "a")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midinous
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James "Nornec" Ratliff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk3
|