diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 8d03b23..811a4c6 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -7,10 +7,10 @@ jobs: document: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: - version: '1.6' - - uses: julia-actions/julia-docdeploy@releases/v1 + version: 1 + - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index f21b7bc..5b31b5b 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -11,7 +11,7 @@ on: jobs: test: timeout-minutes: 30 - name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -29,13 +29,13 @@ jobs: - x86 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 with: file: lcov.info diff --git a/.gitignore b/.gitignore index 89b826a..96876f5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ coverage deps/usr/lib/pa_shim.so deps/usr/lib/pa_shim.dylib deps/usr/lib/pa_shim.dll +.DS_Store +LocalPreferences.toml +Manifest.toml +settings.json diff --git a/Project.toml b/Project.toml index c82362b..51777a9 100644 --- a/Project.toml +++ b/Project.toml @@ -14,6 +14,7 @@ Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" julia = "1.6" alsa_plugins_jll = "1.2.2" libportaudio_jll = "19.6.0" +LinearAlgebra = "1" SampledSignals = "2.1.1" Suppressor = "0.2" diff --git a/examples/lilyplay.jl b/examples/lilyplay.jl index a9904f6..1793354 100644 --- a/examples/lilyplay.jl +++ b/examples/lilyplay.jl @@ -8,7 +8,7 @@ function paudio() devs = PortAudio.devices() if DEFAULTDEVICE < 0 devnum = findfirst(x -> x.maxoutchans > 0, devs) - (devnum == nothing) && error("No output device for audio found") + (devnum === nothing) && error("No output device for audio found") else devnum = DEFAULTDEVICE + 1 end @@ -43,19 +43,19 @@ end function parsevoice(melody::String; tempo = 132, beatunit = 4, lyrics = nothing) ostream = paudio() # initialize audio for output - lyrics_syllables = lyrics == nothing ? nothing : split(lyrics) - lyrics_syllables != nothing && (lyrics_syllables[end] *= "\n") + lyrics_syllables = lyrics === nothing ? nothing : split(lyrics) + lyrics_syllables !== nothing && (lyrics_syllables[end] *= "\n") note_idx = 1 oldduration = 4 for line in split(melody, '\n') percent_idx = findfirst('%', line) # Trim comment - percent_idx == nothing || (line = line[1:(percent_idx - 1)]) + percent_idx === nothing || (line = line[1:(percent_idx - 1)]) for token in split(line) pitch, duration, dotted, sustained = parsetoken(token) - duration == nothing && (duration = oldduration) + duration === nothing && (duration = oldduration) oldduration = duration dotted && (duration *= 1.5) - if lyrics_syllables != nothing && 1 <= note_idx <= length(lyrics_syllables) + if lyrics_syllables !== nothing && 1 <= note_idx <= length(lyrics_syllables) # Print the lyrics, omitting hyphens if lyrics_syllables[note_idx][end] == '-' print(join(split(lyrics_syllables[note_idx][:], "")[1:(end - 1)]), "")