Hello,
I am trying to save a music score based on an example from JuliaMusic, but I receive an error for unknown option error in musescore. I am having trouble solving the issue. Here is my code
using MusicManipulations # tools for handling MIDI data
using MusicVisualizations # to be able to access MuseScore
kick = "Low Floor Tom"
snare = "Acoustic Snare"
stick = "Side Stick"
hihat = "Closed Hi-Hat"
tpq = 960 # Duration of a quarter note in ticks
subdiv = tpq ÷ 8 # note subdivision duration (32nd notes)
patlen = 8 * subdiv # pattern length
A = DrumNote(snare, 0, subdiv; velocity = 100)
R = DrumNote(hihat, 0, subdiv; velocity = 70)
L = DrumNote(stick, 0, subdiv; velocity = 70)
K = DrumNote(kick, 0, subdiv; velocity = 80)
"""
Combine the given notes into a notes that start sequentially.
"""
function make_pattern(v::Vector{<:AbstractNote})
n = Notes([v[1]], 960)
for i in 2:length(v)
push!(n, translate(v[i], (i-1)*subdiv))
end
return n
end
p1 = make_pattern([K, L, L, R, R, L, L, K])
p2 = make_pattern([A, L, L, R, R, L, L, K])
x = combine([p1, translate(p2, patlen)])
musescore("another.png", x)
Here is the error message
Qt: Session management error: Could not open network socket
MuseScore4: Unknown option 'n'.
ERROR: failed process: Process(`musescore -n -T 20 -r 1200 -o another.png another.mid`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error
@ ./process.jl:597 [inlined]
[2] run(::Cmd; wait::Bool)
@ Base ./process.jl:512
[3] run
@ ./process.jl:509 [inlined]
[4] musescore(file::String, notes::Notes{Note}; display::Bool, rmmidi::Bool, c::Cmd)
@ MusicVisualizations ~/.julia/packages/MusicVisualizations/r1cao/src/musescore.jl:64
[5] musescore(file::String, notes::Notes{Note})
@ MusicVisualizations ~/.julia/packages/MusicVisualizations/r1cao/src/musescore.jl:47
[6] top-level scope
@ ~/.julia/dev/sandbox/drums/example.jl:39
Here is the version information:
Status `~/.julia/dev/sandbox/drums/Project.toml`
[274955c0] MusicManipulations v1.7.1
[8e838768] MusicVisualizations v0.2.6
shell> musescore -v
Qt: Session management error: Could not open network socket
MuseScore4 4.6.5