-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (ContentKitxUIExplorer): Add Melody activity
- Loading branch information
Showing
6 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...ivityUIExplorer/Resources/GEKNewSystem/activities/activity-melody-au_clair_de_la_lune.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Leka - iOS Monorepo | ||
# Copyright 2023 APF France handicap | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
id: 0acffb9d1c4141688721ad430aebe0c2 | ||
name: Melody - Au Clair de la Lune | ||
description: L'objectif est de reproduire la mélodie affichée par Leka | ||
image: activity_color_recognition_1 | ||
sequence: | ||
- exercises: | ||
- instructions: Joue les notes de la même couleur que Leka | ||
interface: melody | ||
payload: | ||
instrument: xylophone | ||
songs: | ||
- auClairDeLaLune |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Modules/ContentKit/Sources/Exercise/Exercice+MIDIRecordingPlayer.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright 2023 APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
public enum MIDIRecordingPlayer { | ||
|
||
public struct Payload: Codable { | ||
public let instrument: String | ||
public let songs: [MIDIRecording] | ||
|
||
enum CodingKeys: String, CodingKey { | ||
Check failure on line 11 in Modules/ContentKit/Sources/Exercise/Exercice+MIDIRecordingPlayer.swift GitHub Actions / lint
|
||
case instrument, songs | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
self.instrument = try container.decode(String.self, forKey: .instrument) | ||
|
||
let MIDIRecordingSongs = try container.decode([MIDIRecording.Song].self, forKey: .songs) | ||
self.songs = MIDIRecordingSongs.map { MIDIRecording($0) } | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ extension Exercise { | |
case remoteArrow | ||
case hideAndSeek | ||
case musicalInstruments | ||
case melody | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters