sorta-reaper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4708894ccc4183f9e61488260e7e9648e0d4e487914660855634b1680fffd80
4
- data.tar.gz: a2bbbee2b163a4968e389aa78630fcbc957e364aeef8bc05b7ff2f407d01e0bf
3
+ metadata.gz: 7fc58da1c659eb77fc74fd6506d45e2bdc6c5b700fe172e0d0e4e1fa04691b9a
4
+ data.tar.gz: fa51e41f96d7051ea2c807615cd4c7c9fdd9d82fd99dbed56cc75b6bac81a252
5
5
  SHA512:
6
- metadata.gz: 93e83b9a156de700a88d82912bc23e0b52c7ee8b0cee06507f21431da4d1404326b392d7744a169622db7899e0d21c2021e2b9533cd5fe5c815d91e841e1ac22
7
- data.tar.gz: b73b7834478da332c92e23cbbf729080f9c61a323222c86aadc44d88c20b7b235b45fe0a71aee5486c3add7b2642280451e6a7d4a47b3a25e3797135bf1aa4e8
6
+ metadata.gz: f75931852a51071f5117a8a75593a969f2db4f548c095be7a8e95e22396f10cb9387b9ab6d3f0d9db11d2e63d23acf3d493b9457b37d7d831bbccd94c5c72e1a
7
+ data.tar.gz: bc1e51d6bf5057a0247cc6c9e91948936a97a985ea79729524c617f2a2b2b371e9d65ac77c6e544ead78c5dc90c9cfca3247712c27e8680975547f101f41bde6
data/examples/simple.rb CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  require_relative "../lib/sorta/reaper"
4
4
 
5
- item = Sorta::Reaper::Entity::Item.new(position: 0, length: 10)
5
+ source = Sorta::Reaper::Entity::Source.new(file: File.join(__dir__, "./test_audio.wav"))
6
+ item = Sorta::Reaper::Entity::Item.new(position: 0, length: 10, source: source)
6
7
  track = Sorta::Reaper::Entity::Track.new(name: "generated_track", items: [item])
7
8
  project = Sorta::Reaper::Entity::Project.new(tracks: [track])
8
9
 
data/examples/simple.rpp CHANGED
@@ -1,12 +1,15 @@
1
1
  <REAPER_PROJECT 0.1 "6.53/win64" 1651778831
2
- <TRACK {812edd73-2eeb-4906-9f4b-c46b864bf60b}
2
+ <TRACK {0f9cd9c5-7bde-4b65-8e98-2f49f082c8b1}
3
3
  NAME "generated_track"
4
4
  <ITEM
5
5
  POSITION 0
6
6
  LENGTH 10
7
- IGUID "c20e55d4-8976-40ea-a90f-ace17ba4dbe3"
7
+ <SOURCE WAVE
8
+ FILE "./test_audio.wav"
8
9
  >
9
- TRACKID "{812edd73-2eeb-4906-9f4b-c46b864bf60b}"
10
+ IGUID "2d96f911-cb58-40b8-b4ee-8126a3017518"
11
+ >
12
+ TRACKID "{0f9cd9c5-7bde-4b65-8e98-2f49f082c8b1}"
10
13
  >
11
14
  <NOTES 0 2
12
15
  >
Binary file
Binary file
@@ -8,24 +8,32 @@ module Sorta
8
8
  module Entity
9
9
  class Item < Abstract
10
10
  attribute :position, Types::Integer | Types::Float
11
- attribute :length, Types::Integer | Types::Float
11
+ attribute? :length, Types::Integer | Types::Float
12
12
 
13
13
  attribute :iguid, Types::String.constrained(uuid_v1: true).default { SecureRandom.uuid }
14
14
 
15
+ attribute? :name, Types::String
16
+ attribute? :source, Source
17
+
15
18
  # <ITEM
16
- # POSITION 1.71929551252328
17
- # SNAPOFFS 0
18
- # LENGTH 1
19
- # LOOP 1
20
- # ALLTAKES 0
21
- # FADEIN 1 0 0 1 0 0 0
22
- # FADEOUT 1 0 0 1 0 0 0
23
- # MUTE 0 0
24
- # SEL 0
25
- # IGUID {9A50A0BD-5A41-4132-8F65-47624A4B0840}
26
- # IID 1
19
+ # POSITION 3
20
+ # SNAPOFFS 0
21
+ # LENGTH 8.5
22
+ # LOOP 1
23
+ # ALLTAKES 0
24
+ # FADEIN 1 0 0 1 0 0 0
25
+ # FADEOUT 1 0 0 1 0 0 0
26
+ # MUTE 0 0
27
+ # SEL 0
28
+ # IGUID {7920763B-F9A4-4E42-A5A4-48BB596C96B4}
29
+ # IID 2
30
+ # NAME 09-220503_1522.wav
31
+ # VOLPAN 1 0 1 -1
32
+ # SOFFS 0
33
+ # PLAYRATE 1 1 0 -1 0 0.0025
34
+ # CHANMODE 0
35
+ # GUID {85A6592F-2881-4A99-A935-1858EDF6E2D7}
27
36
  # >
28
- # >
29
37
  end
30
38
  end
31
39
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "abstract"
4
+
5
+ module Sorta
6
+ module Reaper
7
+ module Entity
8
+ class Source < Abstract
9
+ attribute? :file, Types::String
10
+
11
+ # <SOURCE WAVE
12
+ # FILE "C:\Users\odebe\Documents\REAPER Media\133\09-220503_1522.wav"
13
+ # >
14
+ end
15
+ end
16
+ end
17
+ end
@@ -58,6 +58,16 @@ module Sorta
58
58
  strings.join("\n")
59
59
  end
60
60
 
61
+ def visit_Source(obj)
62
+ strings = []
63
+ strings << "<SOURCE WAVE"
64
+
65
+ strings << process_attributes(obj.attributes)
66
+
67
+ strings << ">"
68
+ strings.join("\n")
69
+ end
70
+
61
71
  def visit_Notes(obj)
62
72
  "<NOTES #{obj.unnamed_1} #{obj.unnamed_2}\n>"
63
73
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sorta
4
4
  module Reaper
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
data/lib/sorta/reaper.rb CHANGED
@@ -11,6 +11,7 @@ end
11
11
 
12
12
  require_relative "reaper/version"
13
13
 
14
+ require_relative "reaper/entity/source"
14
15
  require_relative "reaper/entity/record_cfg"
15
16
  require_relative "reaper/entity/applyfx_cfg"
16
17
  require_relative "reaper/entity/notes"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorta-reaper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mihail Odebe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Allow to parse and generate .rpp files from Reaper DAW
14
14
  email:
@@ -30,6 +30,8 @@ files:
30
30
  - examples/simple.rb
31
31
  - examples/simple.rpp
32
32
  - examples/test2.rpp
33
+ - examples/test_audio.wav
34
+ - examples/test_audio.wav.reapeaks
33
35
  - lib/sorta/reaper.rb
34
36
  - lib/sorta/reaper/entity/abstract.rb
35
37
  - lib/sorta/reaper/entity/applyfx_cfg.rb
@@ -37,6 +39,7 @@ files:
37
39
  - lib/sorta/reaper/entity/notes.rb
38
40
  - lib/sorta/reaper/entity/project.rb
39
41
  - lib/sorta/reaper/entity/record_cfg.rb
42
+ - lib/sorta/reaper/entity/source.rb
40
43
  - lib/sorta/reaper/entity/track.rb
41
44
  - lib/sorta/reaper/refinements.rb
42
45
  - lib/sorta/reaper/render/visitor.rb