chordsketch 0.4.0 → 0.5.0
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 +4 -4
- data/lib/aarch64-darwin/libchordsketch_ffi.dylib +0 -0
- data/lib/aarch64-linux/libchordsketch_ffi.so +0 -0
- data/lib/chordsketch_uniffi.rb +128 -0
- data/lib/x86_64-darwin/libchordsketch_ffi.dylib +0 -0
- data/lib/x86_64-linux/libchordsketch_ffi.so +0 -0
- data/lib/x86_64-windows/chordsketch_ffi.dll +0 -0
- 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: '065980b2806a293a5a82867deedd6989dec345ce3fca28ccde112260b60f843c'
|
|
4
|
+
data.tar.gz: b40c70f782e2faebb1530844010bbf7440183393b59fab1734e1a415f7c7a1c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62055b40808a53ad298def181ca368205bd3ad19391711601eed0927c5655d85f36ac3fcbe56d27bc89ecc193316f1dadad6276c380503f59131cfffd5683257
|
|
7
|
+
data.tar.gz: ad186050ec7d5dc35b225ee0aa0e0d8418b334bcde15c9d838a165a76a493a1d9eb990444a5aac7a6e1dfdf7afcf9ebd085af937bb854cc66f5f3a1d44c335fd
|
|
Binary file
|
|
Binary file
|
data/lib/chordsketch_uniffi.rb
CHANGED
|
@@ -126,6 +126,26 @@ end
|
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
+
# The Record type ChordDefine.
|
|
130
|
+
|
|
131
|
+
def self.check_lower_TypeChordDefine(v)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def self.alloc_from_TypeChordDefine(v)
|
|
137
|
+
RustBuffer.allocWithBuilder do |builder|
|
|
138
|
+
builder.write_TypeChordDefine(v)
|
|
139
|
+
return builder.finalize
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def consumeIntoTypeChordDefine
|
|
144
|
+
consumeWithStream do |stream|
|
|
145
|
+
return stream.readTypeChordDefine
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
129
149
|
# The Record type ConversionWithWarnings.
|
|
130
150
|
|
|
131
151
|
def self.check_lower_TypeConversionWithWarnings(v)
|
|
@@ -272,6 +292,27 @@ end
|
|
|
272
292
|
end
|
|
273
293
|
end
|
|
274
294
|
|
|
295
|
+
# The Sequence<T> type for TypeChordDefine.
|
|
296
|
+
|
|
297
|
+
def self.check_lower_SequenceTypeChordDefine(v)
|
|
298
|
+
v.each do |item|
|
|
299
|
+
RustBuffer.check_lower_TypeChordDefine(item)
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
def self.alloc_from_SequenceTypeChordDefine(v)
|
|
304
|
+
RustBuffer.allocWithBuilder do |builder|
|
|
305
|
+
builder.write_SequenceTypeChordDefine(v)
|
|
306
|
+
return builder.finalize()
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
def consumeIntoSequenceTypeChordDefine
|
|
311
|
+
consumeWithStream do |stream|
|
|
312
|
+
return stream.readSequenceTypeChordDefine
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
275
316
|
# The Sequence<T> type for TypeValidationError.
|
|
276
317
|
|
|
277
318
|
def self.check_lower_SequenceTypeValidationError(v)
|
|
@@ -363,6 +404,15 @@ class RustBufferStream
|
|
|
363
404
|
read(size).force_encoding(Encoding::BINARY)
|
|
364
405
|
end
|
|
365
406
|
|
|
407
|
+
# The Record type ChordDefine.
|
|
408
|
+
|
|
409
|
+
def readTypeChordDefine
|
|
410
|
+
ChordDefine.new(
|
|
411
|
+
name: readString,
|
|
412
|
+
raw: readString
|
|
413
|
+
)
|
|
414
|
+
end
|
|
415
|
+
|
|
366
416
|
# The Record type ConversionWithWarnings.
|
|
367
417
|
|
|
368
418
|
def readTypeConversionWithWarnings
|
|
@@ -471,6 +521,22 @@ class RustBufferStream
|
|
|
471
521
|
items
|
|
472
522
|
end
|
|
473
523
|
|
|
524
|
+
# The Sequence<T> type for TypeChordDefine.
|
|
525
|
+
|
|
526
|
+
def readSequenceTypeChordDefine
|
|
527
|
+
count = unpack_from 4, 'l>'
|
|
528
|
+
|
|
529
|
+
raise InternalError, 'Unexpected negative sequence length' if count.negative?
|
|
530
|
+
|
|
531
|
+
items = []
|
|
532
|
+
|
|
533
|
+
count.times do
|
|
534
|
+
items.append readTypeChordDefine
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
items
|
|
538
|
+
end
|
|
539
|
+
|
|
474
540
|
# The Sequence<T> type for TypeValidationError.
|
|
475
541
|
|
|
476
542
|
def readSequenceTypeValidationError
|
|
@@ -555,6 +621,13 @@ class RustBufferBuilder
|
|
|
555
621
|
write v
|
|
556
622
|
end
|
|
557
623
|
|
|
624
|
+
# The Record type ChordDefine.
|
|
625
|
+
|
|
626
|
+
def write_TypeChordDefine(v)
|
|
627
|
+
self.write_String(v.name)
|
|
628
|
+
self.write_String(v.raw)
|
|
629
|
+
end
|
|
630
|
+
|
|
558
631
|
# The Record type ConversionWithWarnings.
|
|
559
632
|
|
|
560
633
|
def write_TypeConversionWithWarnings(v)
|
|
@@ -618,6 +691,16 @@ class RustBufferBuilder
|
|
|
618
691
|
end
|
|
619
692
|
end
|
|
620
693
|
|
|
694
|
+
# The Sequence<T> type for TypeChordDefine.
|
|
695
|
+
|
|
696
|
+
def write_SequenceTypeChordDefine(items)
|
|
697
|
+
pack_into(4, 'l>', items.size)
|
|
698
|
+
|
|
699
|
+
items.each do |item|
|
|
700
|
+
self.write_TypeChordDefine(item)
|
|
701
|
+
end
|
|
702
|
+
end
|
|
703
|
+
|
|
621
704
|
# The Sequence<T> type for TypeValidationError.
|
|
622
705
|
|
|
623
706
|
def write_SequenceTypeValidationError(items)
|
|
@@ -792,6 +875,9 @@ module UniFFILib
|
|
|
792
875
|
attach_function :uniffi_chordsketch_ffi_fn_func_chord_diagram_svg,
|
|
793
876
|
[RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
|
|
794
877
|
RustBuffer.by_value
|
|
878
|
+
attach_function :uniffi_chordsketch_ffi_fn_func_chord_diagram_svg_with_defines,
|
|
879
|
+
[RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
|
|
880
|
+
RustBuffer.by_value
|
|
795
881
|
attach_function :uniffi_chordsketch_ffi_fn_func_convert_chordpro_to_irealb,
|
|
796
882
|
[RustBuffer.by_value, RustCallStatus.by_ref],
|
|
797
883
|
RustBuffer.by_value
|
|
@@ -864,6 +950,9 @@ module UniFFILib
|
|
|
864
950
|
attach_function :uniffi_chordsketch_ffi_checksum_func_chord_diagram_svg,
|
|
865
951
|
[RustCallStatus.by_ref],
|
|
866
952
|
:uint16
|
|
953
|
+
attach_function :uniffi_chordsketch_ffi_checksum_func_chord_diagram_svg_with_defines,
|
|
954
|
+
[RustCallStatus.by_ref],
|
|
955
|
+
:uint16
|
|
867
956
|
attach_function :uniffi_chordsketch_ffi_checksum_func_convert_chordpro_to_irealb,
|
|
868
957
|
[RustCallStatus.by_ref],
|
|
869
958
|
:uint16
|
|
@@ -931,6 +1020,27 @@ end
|
|
|
931
1020
|
|
|
932
1021
|
|
|
933
1022
|
|
|
1023
|
+
# Record type ChordDefine
|
|
1024
|
+
class ChordDefine
|
|
1025
|
+
attr_reader :name, :raw
|
|
1026
|
+
|
|
1027
|
+
def initialize(name:, raw:)
|
|
1028
|
+
@name = name
|
|
1029
|
+
@raw = raw
|
|
1030
|
+
end
|
|
1031
|
+
|
|
1032
|
+
def ==(other)
|
|
1033
|
+
if @name != other.name
|
|
1034
|
+
return false
|
|
1035
|
+
end
|
|
1036
|
+
if @raw != other.raw
|
|
1037
|
+
return false
|
|
1038
|
+
end
|
|
1039
|
+
|
|
1040
|
+
true
|
|
1041
|
+
end
|
|
1042
|
+
end
|
|
1043
|
+
|
|
934
1044
|
# Record type ConversionWithWarnings
|
|
935
1045
|
class ConversionWithWarnings
|
|
936
1046
|
attr_reader :output, :warnings
|
|
@@ -1038,6 +1148,24 @@ end
|
|
|
1038
1148
|
|
|
1039
1149
|
|
|
1040
1150
|
|
|
1151
|
+
def self.chord_diagram_svg_with_defines(chord, instrument, defines)
|
|
1152
|
+
chord = Chordsketch::uniffi_utf8(chord)
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
instrument = Chordsketch::uniffi_utf8(instrument)
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
defines = defines
|
|
1159
|
+
RustBuffer.check_lower_SequenceTypeChordDefine(defines)
|
|
1160
|
+
|
|
1161
|
+
result = Chordsketch.rust_call_with_error(ChordSketchError,:uniffi_chordsketch_ffi_fn_func_chord_diagram_svg_with_defines,RustBuffer.allocFromString(chord),RustBuffer.allocFromString(instrument),RustBuffer.alloc_from_SequenceTypeChordDefine(defines))
|
|
1162
|
+
return result.consumeIntoOptionalstring
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1041
1169
|
def self.convert_chordpro_to_irealb(input)
|
|
1042
1170
|
input = Chordsketch::uniffi_utf8(input)
|
|
1043
1171
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chordsketch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- koedame
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|