@@ -14,23 +14,20 @@ public class Song {
1414 private String description ;
1515 private float speed ;
1616 private float delay ;
17+ private CustomInstrument [] customInstrument ;
1718
1819 public Song (Song other ) {
19- this .speed = other .getSpeed ();
20- delay = 20 / speed ;
21- this .layerHashMap = other .getLayerHashMap ();
22- this .songHeight = other .getSongHeight ();
23- this .length = other .getLength ();
24- this .title = other .getTitle ();
25- this .author = other .getAuthor ();
26- this .description = other .getDescription ();
27- this .path = other .getPath ();
20+ this (other .getSpeed (), other .getLayerHashMap (), other .getSongHeight (), other .getLength (), other .getTitle (), other .getAuthor (), other .getDescription (), other .getPath ());
2821 }
29-
22+
3023 public Song (float speed , HashMap <Integer , Layer > layerHashMap ,
3124 short songHeight , final short length , String title , String author ,
3225 String description , File path ) {
33- this .speed = speed ;
26+ this (speed , layerHashMap , songHeight , length , title , author , description , path , new CustomInstrument [0 ]);
27+ }
28+
29+ public Song (float speed , HashMap <Integer , Layer > layerHashMap , short songHeight , final short length , String title , String author , String description , File path , CustomInstrument [] customInstrument ) {
30+ this .speed = speed ;
3431 delay = 20 / speed ;
3532 this .layerHashMap = layerHashMap ;
3633 this .songHeight = songHeight ;
@@ -39,6 +36,7 @@ public Song(float speed, HashMap<Integer, Layer> layerHashMap,
3936 this .author = author ;
4037 this .description = description ;
4138 this .path = path ;
39+ this .customInstrument = customInstrument ;
4240 }
4341
4442 public HashMap <Integer , Layer > getLayerHashMap () {
@@ -76,4 +74,8 @@ public float getSpeed() {
7674 public float getDelay () {
7775 return delay ;
7876 }
77+
78+ public CustomInstrument [] getCustomInstruments (){
79+ return customInstrument ;
80+ }
7981}
0 commit comments